A3 - The Guessing Game?
does anyone have any DEEPER notion about A3 - The Guessing Game: http://www.codechef.com/problems/A3 approach? thanx beforehand.
View Articlesubset sum
Given a set of n numbers ai sum up to M, and any K ≤ M, whether there is a subset of the numbers such that they sum up to (hit)??can any one plz explain this code??? and what r the changes required to...
View ArticleFast Multiplication - explanation
I will try to explain the working of the fast multiplication function in brief.If we want to do an operation like 10^18 * 10^18 % MOD, where MOD is also of the order of 10^18, direct multiplication...
View ArticleATM need help
#include < stdio.h > void main () { int w; float b; scanf("%d %f",&w,&b); if ((w%5==0)&&((b-0.5)>w)) printf("%.2f",(b-0.5-w)); else printf("%.2f",b); } whats wrong in this?
View Articlegetting sigsegv error LEBOMBS
i'm getting sigsegv error(runtime error) i checked the guidelines .to my knowledge i followed them.please help in finding the error .thanks in advance.question linkmy solution
View ArticleLUCKY5 - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONIn this problem the only thing you should notice is that the only operation that you need to use is the changing of digits.Indeed, adding leading...
View ArticleBinary tree structure in this case.
Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a pointer to a node. When you pick the tree from that node up what will be the structure of the tree....
View ArticleFastest read / write in java
I am using simple bufferreader but it is slow enough and due to this in some program i got time limit exceed problem . So guys tell me about fastest read and write code for java program.
View ArticleMTRICK Problem
http://www.codechef.com/viewsolution/3207227My solution was BIT. But It's get's many time. I think my solution is better than tester solution.How i can optimism time. Any suggestion About my solution.
View ArticleApplication of breadth first search
I am trying to solve this question: http://www.spoj.com/problems/FINDPATH/ Don't know where it's going wrong. Firstly i am ignoring all the a[i] which are not divisors of destination, i.e., N I am...
View ArticleCodechef Rating System
Can anybody explain me how exactly the rating of any user is calculated ?I did't get it from this link also http://blog.codechef.com/2010/12/27/a-surprise-in-store-this-new-year/Please Explain us with...
View ArticleLAPIN - Editorial
Problem Link:PracticeContestDifficulty:CakewalkPre-requisites:ad-hocProblem:Given a string S, if we split it in the middle (if S has an odd number of characters, disregard the middle character), then...
View ArticleNZEC in Funny Marble
I was solving the funny marble problem of december/13 long contest problem. I have implemented segment tree , but getting NZEC error in code. Plz help !import java.io.*;class funny{public static void...
View ArticleMerciless Chef Question: O((q+n)logn) solution is giving TLE
I had submitted the solution for this question (Merciless chef) but it is giving me TLE. I have solved it by first traversing the tree in preorder and obtaining the start and end index of inferior...
View ArticleHow did you discover Sperner's Theorem for SPOONS?
http://www.codechef.com/SEPT13/problems/SPOONS1) Is Sperner's Theorem a common theorem?2) If it isn't, how did you discover it after reading the question? what were the clues?
View ArticleNZEC in java but not in C++
The code in java got NZEC but the same code with same logic in C++ got Accepted . Can you tell me why ?Link to the problem http://www.spoj.com/problems/BYTESM2/C++...
View ArticleKnapsack Problems?
What are your favourite knapsack problems? Please link them in the answer. I just learnt the algo and would like to get proficient in it. Thanks :D
View Articleimproving program execution time
do recursive programs are less time taking than iterative ones??
View ArticleA3 - "The Guessing Game" Editorial / Explanation
does anyone have any DEEPER notion about A3 - The Guessing Game: http://www.codechef.com/problems/A3 approach? thanx beforehand.edit: pls look below for explanation. and pls show your gratitude by...
View ArticleJava version (switch)
Hello, I posted my submit to http://www.codechef.com/problems/A3/. It works locally, but on this site I have compilation errors:Main.java:75: incompatible types found : java.lang.String required: int...
View Article