whats wrong with the code
include <stdio.h>int main() { int i,j,flag[2000],temp,num1,num2,temp2,val,rept; for(i=1;i<1000;i++) flag[i]=1; flag[1]=0; //the 32 acts as a handle on the number of primes that there can be...
View ArticleCHEATING : 7 exactly same solution for MIKE3
Here is a list of 7 exactly same solutions made by different users for the problem MIKE3, asked in...
View ArticleAlien Spiral
hey can anybody explain the logic behind this "http://www.codechef.com/INSOM1/problems/INSOMA1" question?
View ArticleSegmentation error, but everything looks fine.. help!
violates terms of use: ongoing contest
View ArticleWhat is wrong with this code for The Shortest path in Binary tree! ! ! HLEP! ! !
violates terms of use: ongoing contest
View ArticleFrom where to start programming ??
I am new at programming, I know c/c++. can anybody suggest me any books or material so that i can develop logic,algorithm successfully. Plz help me. I am really interested in programming...
View Articleshortest distances
hello all, it would be great if someone gives me an efficient algorithm to this questionIf weight of an edge of a given graph is increased or decreased for which we already computed the shortest...
View Articleflipping coin TLE..??
I am using O(q(b-a)lgn) algo(BIT) still the tle comes up. how to improve on that .I am guessing its need to solved as range update and range query prob but still could anyone provide me with the...
View ArticleNUMFACT confusion
I came across a problem, NUMFACT where number of factors of extremely large numbers need to be calculated in under 1 second. I understood that the number needs to be factorized into its prime factors...
View Articlechef and digit strong cases
Plz provide some strong test cases with its output.. for Question ADIGIT..
View Articleproblem in initializing of array?
in question buy-1 get-1 ,i have used freq[52]={0}(to initialize frequency array) in while loop of test case.While submitting, it gave wrong answer.after reading submitted solutions,i declared freq[52]...
View ArticleAapril Challenge Chef and Digit
i am getting time limit exceed, please help me, my answer is totally correct but i am getting time limit exceed.
View Articleneed algorithm
is there is some algorithm to find the fast method of "sum of differences of each elements in an array upto 10^9..
View ArticleC++ NZEC Error
I did not call any exception or did not forget any return statements but I am getting this NZECerror.Could any one explan me the cause of this error other than mentioned in the FAQ
View Articlestreing to int array
which is the fastest method to convert string to integer array? in a question iam given integers as input without spaces.. i need to access each one of them.. iam storing them into string and then...
View Articletime exceed in turbo sort
include<stdio.h>//#include<conio.h> int quiksort(int,int); int partition(int,int); //#include<malloc.h> int a[1000001]; int main() { // int a[1000001]; long int i,t;...
View ArticleWhat kind of comment should I post on the problem page?
Is there any comment posting guideline? I am new on this website. I have so many doubts while I participate in a contest. Can I ask them on the problem page by posting a comment? Will I be banned for...
View ArticleHow should I test my program
I am done writing the code. And I am not sure if my program works correctly or not. How do I go about testing it?
View Articlehelp in solving question
Help in solving below problem. I am unable to solve this problem.Therasa is a Nurse. She wants to give some tablets to the patients in her practice. All the patients sit in a line and each of them has...
View Article