Quantcast
Browsing all 39796 articles
Browse latest View live

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 Article


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


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

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

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


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

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

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


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


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

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

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

Java Input

how to accept inputs on same line on console in java??? Plz help..

View Article


TLE in a java program. Help Needed..

Program link: http://www.codechef.com/problems/DIVISORSMy solution: http://www.codechef.com/viewsolution/2568575

View Article

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


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

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


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

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

Cooling 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
Browsing all 39796 articles
Browse latest View live


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