can anyone explain this?????
Find the number of palindromic strings that can be made of length N, or less
View Articlepairwise operations on set
Recently I have encountered many questions which require performing some operations like XOR, or some f(x) pairwise on a Set....by pairwise I mean, if set is {2, 4, 6}then required O/P is 2^4 + 4^6 +...
View Articlemedium level problem - Marbles SIGSEGV error
for the problem Marbles : http://www.codechef.com/problems/MARBLES here is the code. But the problem is code chef is returning SIGSEGV error and i am unable to find out the problem in my code. So...
View ArticleTACHSTCK - Editorial
Problem Link:PracticeContestDifficulty:CakewalkPre-requisites:Ad HocProblem:Given N sticks of lengths L[1], L[2], ... L[N] and a positive integer D. Two sticks can be paired if the difference of their...
View ArticleFinding the difference between speed of c++ and java program?
Execution of time of c++ came out to be 0.01 sec and that of java came out to be 0.43 sec..Even with such difference in execution time how coders are successfully able to compete in programming...
View Articlemarbles logic HELP PLSS
What is the logic of marbles in medium practice section....how it can be (n-1)C(k-1)??.....pls help...thanks
View ArticleEDITORIAL BYTES4 - TODO EN UNO
Problem Link: http://www.codechef.com/problems/BYTES4Difficulty : Medium HardStrategy : GCD,SieveExplanation : Here we have to find the maximum GCD of all the pairs possible. The most trivial method is...
View ArticleFCTRL Time Help
`#include<stdio.h>include<stdlib.h>inline void scanint(long int a) { char c = 0; while(c<33) //c = fgetc_unlocked(stdin); c = getc(stdin); a = 0; while(c>33) { a = (a)*10 + c - '0';...
View Articlewhat is best deterministic primality checking algorithm??
i hv tried checking primality of a number bt testing till sqrt of number bt its too time consuming for big numbers.. Fermats test involves expotential terms and is tedious to implement for a large...
View ArticleArithmetic series -Google Interview Question
Given an array of integers A, give an algorithm to find the longest Arithmetic progression in it, i.e find a sequence i1 < i2 < … < ik, such that A[i1], A[i2], …, A[ik] forms an arithmetic...
View ArticleArithmetic series -Google Interview Question
Given an array of integers A, give an algorithm to find the longest Arithmetic progression in it, i.e find a sequence i1 < i2 < … < ik, such that A[i1], A[i2], …, A[ik] forms an arithmetic...
View ArticleSIC Assembler PASS 2
This is the code i did for pass2 of a SIC assembler. Please go through it and feedback on how to improve it.#include<stdio.h> #include<conio.h> #include<string.h>...
View ArticleLUCKY1 - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONIt is well-known that the sum of any range Sum[l; r] can be rewritten in form Sum[0; r]-Sum[0; l-1]. Let Sum4[i] is the total number of digits 4 in...
View ArticleThe Lead Game , What's wrong with my code ?
The code is for question The Lead Game ,its showing wrong answer while submitting but running perfectly on ideone.com .please help . #include<stdio.h> int main() { int...
View ArticleSmall Factorial
//my code for smallfactorial,it's giving correct output in my system but not here..please tell me whats wrong in it???#include <stdio.h> #include <stdlib.h> int fact(int); int main() { int...
View Articlehelp fierce battles wa
http://www.codechef.com/viewsolution/3337330my code shows wa again and again showing correct ans for many test casesplease helpthanks in advance!!problem link: http://www.codechef.com/problems/DRGNBOOL
View Articlehow to implement tutte matrix and apply gaussian elimination of a given graph?
i know that tutte matrix is used to check perfect matching in a given graph? and we make a skew symmetric matrix in it. but how to implement it? can anybody help me out.? Thanks in advance :) (PS : I...
View Articleproblem tags not working
hey!! the problem tags are not working.are you people also facing the same problem?
View Articletransform the expression
http://www.codechef.com/viewsolution/3339018 see this is my code for3rd test case thier is run time error can any body fix mah code
View ArticleEasy Question - Birthday Candles
for the easy level question Birthday Candles : http://www.codechef.com/problems/CANDLE/ i have tried all the test cases that i could but i m still getting wrong answer. Please tell me the tell case for...
View Article