A problem to verify a lotto design
How can I do a program that verifies that lotto design L(39,7,4,7) is at most n by listing correct rows? Namely, I have to choose rows of seven numbers from the set 1,2,...,39 and I have to make sure...
View Articlewrong approach
http://www.codechef.com/problems/NUMGAME in this problem if n is even then alice will win and else bob,this is the correct ans for it, but according to me it should not be the answer, example if n=5...
View ArticleWhen intializing a char array, is the remaining space zero filled or...
If a char array is uninitialized, are all the array elements automatically initialized as 0 ? I was solving the problem Holes and my first solution which got WA was this : http://ideone.com/Ix4kc9I...
View ArticleGALACTIK - Editorial
PROBLEM LINKPracticeContestDIFFICULTYEASYPREREQUISITESDisjoint Set Data Structure, Simple MathPROBLEMThere are N nodes in a graph labeled from 1 to N. Each node has an associated cost with it, given by...
View ArticleNeed help to start
Hi all, I am a newbie to code chef. I am here to became on of the Best coders. But I have no graduate degree in hand because I am a college Drop-out(B.TECH) because of financial problem. But I am...
View ArticleDoes TLE mean that the answer was correct but only the program was slow?
I either need to make my program run faster, or need to think of a different algorithm all together. What does TLE really mean?Shows 1.01 secs whereas the time limit is 1 second.
View ArticleFill the rectangles with maximum "important" values.
We have a rectangle with n rows and m columns filled with numbers from 1 to nm. Cell (i,j) of the rectangle is important iff: i = 1 and j = 1 (or) *there is an important cell (a,b) such that (a,b) is a...
View ArticleByteCode 2013: Not worth doing.
Hi everybody,I have been doing the contest ( http://www.codechef.com/BTCD2013/ ) and I am disappointed to say that I have never seen a poorer contest in the history of my programming contests...
View ArticleScanf and CIN giving different outputs. Please help.
I wrote a program and it was satisfying the test cases. I submitted the program but it gave TLE. So, I replaced all CINs with SCANFs. I don't know C, so please tell me what's going wrong. I cannot...
View Articlenegative index of array
hi guys can you explain what the meaning of negative index. i read someone code and don't understand because there like these:arr1[-1]='0'; so i search on net still i don't find an answer.thx for answer.
View ArticleSuggest new features you think should be added to CodeChef ?
I know have improved a lot by this codechef...its really awesome. But i would like to tell to the admin that codechef should improve a bit more, imean should add some more features....Such as message...
View ArticleNZEC ERROR IN JAVA PROGRAM...PLZZ HELP
Recently I took up a problem to solve using java but it showed NZEC error on submission. Problem can be viewed here:: http://www.codechef.com/problems/DIVISORS/My solution is here. Plz take a look at...
View ArticleTLE in a java program. Help Needed..
Program link: http://www.codechef.com/problems/DIVISORSMy solution: http://www.codechef.com/viewsolution/2568575
View Articlesweep line / largest polygon
Hi, I have a set of segments and I have to calculate the area of the largest polygon which can be build using this segments (the polygon must be enclosed)… sounds like a sweep-line problem but I have...
View ArticleANAGRAM WA
This is a practice problem for an upcoming contest...i cant figure out a case where my code fails to produce the correct output...can ne1 pls point out the mistake...thanks in advance...:)ANAGRAM Given...
View ArticleReferences for learning C
Hello, I have a reasonably knowledge regarding java and I would like to learn the C language, it's just curiosity and I want to have a better understanding of the lower level languages (comparing to...
View ArticleOperation on Huge numbers in C++
In C++ / C we can't work with very large numbers like 10^100 ,But in some cases we need to work with such large numbers specially for solving some problems.... I searched net and from my own idea I...
View ArticleBEX - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESStack Data StructurePROBLEMHarry has a lot of books messed on the floor. He keeps a pile of books. At any time, he can put a book that has some...
View ArticleCooling Pies : COOLING
Code : http://ideone.com/FtzkyMWhat is the error in my code?After taking the input, the nested for loops are used to compare all the elements of array b (where I have stored the weights of the pies),...
View Article