Life, the Universe, and Everything , whats wrong with this c++ code
Hi im new to codechef and just wanted to know why this solution is not being accepted even though it gives me the correct output on codeblocks. I read the faqs and even those didnt help. Please see,...
View ArticleCOOLING PIES - WA
#include <stdio.h> int main() { int t, piesOccupied; scanf("%d", &t); while (t--) { int n, i, j; scanf("%d", &n); piesOccupied = 0; int piesWeight[100]; piesWeight[0] = 0; int...
View ArticleNZEC in Python code for DIGJUMPS.
Hello, I have this Python solution for Chef and Digit Jumps which is giving me an NZEC error. I believe the algorithm is correct and BFS-like, but I am new to debugging NZECs in Python. Can anyone...
View Articlegetting the in.txt and out.txt
Admin , can i please get the in.txt and out.txt for BESTBATS. My answer is working correctly for the testcases I have given(verified),but codechef's judge is reporting wrong answer.
View ArticleWhy is this approach giving while the other one is not ?
Have a look at this code. Then at this code.Can somebody please help me figure out why is my approach giving TLE and the other one is not? This problem disturbed me a lot during the contest.
View ArticleTLE IN FUNC
PLZZ SUGGEST ANY WAYS TO REMOVE TLE IN FUNC...SOLN LINK... :-- http://www.codechef.com/viewsolution/4109517THNX IN ADVANCE
View ArticleLONG CHALLENGE JUNE14 ratings not updated?
It is more than 24 hours and ratings for the JUNE14 is not yet updated.
View ArticleStruggling with DP
I am a beginner in dynamic programming,I am not getting how to approach problems based on it.What is the best source or reference of DP for a beginner? thanks
View ArticleGRAYSC - Editorial
PROBLEM LINK:PracticeContestDIFFICULTY:Easy-MediumPREREQUISITES:Pigeonhole Principle, SetsPROBLEM:You're given N 64 bit integers such that any two successive numbers differ at exactly 1 bit. Your job...
View ArticleATM problem
include<stdio.h>main() { int wit; float bal; scanf("%d%f",&wit,&bal); if((wit>0)&&(bal>=0)&&(wit<=2000)&&(bal<=2000)) {...
View ArticleDynamic Programming prerequisites?
What all things I have to learn first before starting dynamic programming. I know data structures, but I don't know applying divide and conquer,greedy etc.. Please help. Can I start DP directly?
View ArticleCheating in June Long Contest 2013
Just want to bring it to the admin's notice. Problem - http://www.codechef.com/JUNE13/problems/SPMATRIX Following set of solutions by different users are same:...
View Article#define directive use ?
What exactly are the benefits of using #define directives like this :include<stdio.h>define QUICK(x) printf("%s\n",x);define ADD(x, y) printf("%d\n",x+y);int main() { QUICK("Hello!") ADD(5,6)...
View ArticleChef and Functions JUNE 2014 CHALLENGE ??
I USED SIMPLE APPROACH TO SOLVE THIS AND GET TIME LIMIT EXCEED. PLEASE EXPLAIN ME SOLUTION OF THIS PROBLEM AND APPROACH TO SOLVE THIS PROBLEM,WHICH TYPE OF ALGORITHM SHOULD BE USED TO SOLVE THESE...
View Articlenltk( natural language processing)
I want to design a search engine in python using nltk( language processing)[designing a website in web2py.. i need to add advanced search engine in it]. Do i have to study complete ntlk book :( .. does...
View ArticleWhy is this approach giving WA while the other one is not ?
Have a look at this code. Then at this code.Can somebody please help me figure out why is my approach giving WA and the other one is not? This problem disturbed me a lot during the contest.
View ArticleWhy is C program taking more memory than usual in codechef?
Just used two integer variables in my program and codechef says Mem 2.2MID Date/Time User Result Time Mem Lang Solution4112817 41 min ago pravinkumarr 0.09 2.2M C ViewMy program...
View ArticleATM problem showing runtime error
#include <stdio.h> int main() { int wi; float ab; scanf("%4d%4.2f", &wi, &ab); if(ab>wi&&(wi%5==0)) printf("%4.2f", (ab-wi-0.5)); else printf("%4.2f", ab); } i don't know why...
View Articlenew to recursion, getting StackOverflow. Help!
I am writing a divide and conquer recursive function to find minimum element in array. But I am getting java.lang.StackOverflowError . Here is my code. Thanks in advance.import java.util.Scanner;...
View Article