Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 40121 articles
Browse latest View live
↧

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 Article


CHEATING : 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 Article


Alien Spiral

hey can anybody explain the logic behind this "http://www.codechef.com/INSOM1/problems/INSOMA1" question?

View Article

Segmentation error, but everything looks fine.. help!

violates terms of use: ongoing contest

View Article

What is wrong with this code for The Shortest path in Binary tree! ! ! HLEP! ! !

violates terms of use: ongoing contest

View Article


From 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 Article

shortest 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 Article

flipping 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 Article


NUMFACT 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 Article


chef and digit strong cases

Plz provide some strong test cases with its output.. for Question ADIGIT..

View Article

problem 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 Article

Aapril 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 Article

need 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 Article


C++ 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 Article

streing 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 Article


fast i/o for string

what is the fastest method to take string as input?

View Article

time 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 Article


What 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 Article

How 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 Article

help 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
Browsing all 40121 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>