TLE in spiral maze
can someone plz tell me why this code gives TLE for question(http://www.codechef.com/problems/TIC05): http://www.codechef.com/viewsolution/3874966 while it works fine on ideone and on my pc:...
View ArticleClarification needed in Chef and strange matrix (chefbm)
please clarify As per constraints 1 ≤ n, m. if n is 1 only one column. how cost can be calculated through a(i)(j) - a(i)(j - 1). As the cost of a movement is a(i)(j) - a(i)(j - 1).I am getting wrong...
View ArticlePrinting to Standard Output in java is causing NZEC error for the problem May...
I solved the problem http://www.codechef.com/MAY14/problems/CHEFBM/ but when I print to console using System.out.println is causing NZEC runtime error.If I comment out System.out.println statements...
View ArticleTOURMAP solution giving WA,pls help!
I tried coding the solution of the problem using hashmap and vectors(not using graph),can someone pls point out the error in my code? Here is my code:http://www.codechef.com/viewsolution/3874881
View ArticleLEBALONS MAY-14 LONG
I think there is an overflow at boundary condition. case ex. 1 40 0 1 1000000 1 1000000 upto 40 times. calculation will reach beyond the scope of greatest of data types like long long. should I assume...
View ArticlePerl : time multiplier ?
Hello,I found this five years old post listing (interpreted/bytecoded) languages that have a multiplier for time limits. I cannot see Perl in that list.Blog post on time multipliersI have tried, with...
View ArticleApproach to become Good Programmer.
I really want to know that whats the ideal approach for becoming a good programmer? Whats the secret to solve the Codechef questions? Any External links, online tutorials, e-books are welcome. ANY help...
View ArticleWrong file name of my java program
For the "chef" problem, I created a java program in a file Jump.java.However, when I upload my file and compile it, the error log suggests that my file name is Main.java and I should change it to...
View ArticleKFORK - Editorial
Problem link : contestpracticeDifficulty : SimplePre-requisites : Basic programming language conceptsProblem : Find the number of ways to put a black knight on a chessboard with a number of white...
View Articlewhy c# keyword showing compiler error
Sir chef jump program is running on my system but here its showing compiler error in keyword "using" of c# lang.
View Articlewhich compiler to select???
which compiler shall i choose to upload my code ????include<iostream.h>include<conio.h>void main() {double n; cin>>n; int i; i=int(n)%6; if(i==0||i==1||i==3) cout<<"yes"; else...
View ArticleSet System.setOut(); to Command Prompt
I want to set output stream to the Command prompt like this:Process p = Runtime.getRuntime() .exec("C:\\Windows\\System32\\cmd.exe /c start cls"); System.setOut(new...
View ArticleCNPIIM - Editorial
PROBLEM LINK:PracticeContestAuthor:Bruno OliveiraTester:Shiplu Hawlader and Mahbubul HasanEditorialist:Lalit KunduDIFFICULTY:EASY PREREQUISITES:Number Theory PROBLEM:Find number of 2X2 matrices such...
View ArticleChallenge/bottom questions Long competitions
I always end up solving top 5 questions and don't know what approach should I take in order to solve the challenge question. Moreover I find that bottom questions of codechef long challenges are easy...
View ArticleBook for Data structure and algorithms .
I want to learn data structures and algorithms . I have done some basic data structure and programming . I want to learn advanced data structures which book should I use .
View ArticleTopcoder SRM
I generally hear that to improve coding one should do Topcoder Div2 questions , but there are so many srm rounds . So I want to ask which srm contest to start from , like from the beginning or from the...
View Articlehow to sort the co-ordinates (x, y) with respect to x? (c++ stl)
Suppose the list of pairs <(1, 3),(3, 2), (2, 4)> and i want to result as <(1, 3), (2, 4), (3, 2)>. How can i implement it using some STL in C++?
View ArticleSorry, my question isnt related to programming but willl feel delighted if...
Two of my screws fell on its own from my laptop, initially I didn't care much about it. But recently some damage happened to my laptop. Inspite of being in warranty the company is making excuses that...
View Article