CAKE2AM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:medium-hardPREREQUISITES:Graph Theory, Maximum Independent Set in Bipartite Graphs,...
View ArticleTOTR:WRONG ANSWER
THE CODE RUNS FINE FOR TEST CASES..#include <iostream> #include <cstdlib> #include<cctype> #include<cstring> using namespace std; int main () { int t; char m[26]; char...
View ArticleGAMEAAM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:easyPREREQUISITES:Algorithmic Game Theory, Sprague Grundy TheoremGo through these...
View ArticleGANGAAM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Vinod ReddyDIFFICULTY:easyPREREQUISITES:Greedy AlgorithmsEXPLANATIONWe will solve the problem using greedy...
View ArticleWA in CAKE1AM
I am getting WA. Algorithm looks correct to me. Am I missing any corner cases?main() { ll tst; cin>>tst; while(--tst) { ll...
View ArticleWRONG WAY-KARMA (PLEASE CHECK)
//after a recent post by kchahdog about unethical karma farming last month a similar case :(I noticed that this user was upvoted nearly 12 times in a matter of 5 mins by this user today(with same...
View ArticleSTACK SIZE FOR JAVA AND PYTHON
I think all java users are aware of the small stacksize provided defaultly.... recently i used python and it also same as java. So can something be done to equalize the stacksize of java with the...
View ArticleCook off Jan 2014 - Subtraction Game
the question for the solution below is - http://www.codechef.com/problems/GAMEAAMNow...The following code is working fine for the test cases but giving wrong answer on submission. What is the mistake...
View ArticleGERALD04 - Editorial
PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:ProgrammingPROBLEM:GF --- (t2 - t1) --- Chef --- dist --- HomeGiven...
View Articlewhats wrong with this atm code ??
#include <stdio.h> #include <stdlib.h> int main() { float a[2]; scanf("%f%f",&a[0],&a[1]); int d=(int)a[0]; float val=a[1]-a[0]-0.5; if(d%5==0&&a[0]<a[1]+0.5) {...
View ArticleWA for COINS
I've been trying to solve this simple dp problem but I'm getting WA. I can't find anything wrong with my code. Can anybody please help me out?Problem - http://www.codechef.com/problems/COINSmy...
View ArticleCOOLING:WA. CANT GET WHATS WRONG.
#include <iostream> #include <cstdlib> int compare (const void * a, const void * b) { return ( *(int*)a - *(int*)b ); } int main () { int num,i; int t; scanf("%d",&t); while(t--){...
View ArticleATM problem to slow?
int cash,balance; float saldo; scanf("%d",&cash); scanf("%d",&balance); if(cash%5!=0 || cash+0.5>balance){ printf("%d",balance); return 1; } else saldo=balance-cash-0.5;...
View ArticleKNIGHTS - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONIf we construct a graph where each vertex corresponds to a square of the chessboard, and an edge connects two squares if they cannot both hold...
View ArticleIntroduction to Graphs: Definitions, Traversal, Depth-First Search
Hello @all,As I have mentioned on several posts here on forums, I am only now starting to learn graphs in a more educated, methodical and serious way, so, after I have studied DFS for few days and due...
View ArticlePython or C
Hi all, I am new to codechef and now i am getting deeply interested in solving codechef problems. The question that flutters my mind is that should i prefer python or C for solving. I want to know all...
View ArticleFRBSUM - Editorial
PROBLEM LINK:PracticeContestAuthor:Constantine SokolTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Segment Tree, Binary Search, Persistent Segment Tree.PROBLEM:Given A[1..N], and...
View Articleexplaination of Forbidden Sum?
can someone explain this part of the editorial of Forbidden Sum of January Long (http://discuss.codechef.com/questions/35346/frbsum-editorial) "For the static Segment Tree, we can maintain a sorted...
View Article