TLE in ATTIC
http://www.codechef.com/COOK35/status/ATTIC,cool123Can any body plz tell me why the second soln gives TLE. Thns in advance.
View ArticlePractice problems related to trees
Hello Everyone, I am very new to programming and data structures, I am reading trees from "Introduction to Algorithm" by CLRS, I need help in practicing them, I don't know any site where I can get lot...
View Articlecalculating memory usage ?
Is there a way to calculate the memory consumed by my program in linux ? What method does codechef use to get the memory used, can I do that on my pc ? I read something about bsd-process-management,...
View Articlealethio june cook off TLE help
s = raw_input() slen = len(s) maxnum=0 if slen==1: if('0' <= s[0] <='9'): print s[0] else:S print "9" else: for i in range(slen): k=0 temp="" count=0 j=i while(j<slen): if('0'<= s[j]...
View Articlecome on somebody pls answer this question.Is it necessary that a file created...
pls give appropriate explanation supporting your yes/no
View Articleattic problem cook off june .
can someone please tell me why my code was giving WA ?#include<stdio.h> #include<string.h> int main() { int times,i,k,sum=0; scanf("%d",×); for( i=0;i<times;i++) { char...
View ArticleSolve COPS AND PRISONERS
http://www.codechef.com/problems/APGE01I am getting WA in this question. please provide a correct solution. My solutions : http://www.codechef.com/status/APGE01,himanshujaju
View ArticleWA ALETHIO
inCase = raw_input() maxInt = 0 current = "" cInt = ['1','2','3','4','5','6','7','8','9','0'] LetterUse = False index = 0 for element in inCase: if(element in cInt): ## is a number current+=element...
View ArticleTRANSFIG - Editorial
Problem Link:PracticeContestDifficulty:MediumPre-requisites:TreesProblem:You are given the preorder and the postorder traversals of a rooted K-ary tree. Find how many such trees are there having the...
View Articlesame program in java submitted but in c not
i have applied same logic to attic question of june cook of it was submitted in java but when i do it in c it is not submitted...it says wrong answer. why???
View Articlewhy tle show up?
#include<stdio.h> #include<string.h> int main() { long long int t; char s[500001]; long long int i=0,length=0,jump=0,day=0; scanf("%Ld",&t); while(t--) { scanf("%s",&s);...
View Articlegetting paragraph without using gets() function
This is my code...This will executing infinte times...can any help me to getting the paragraph without gets()char str[100];int i=0; for(cin>>str[i];str[i]!='\n';) {++i; cin>>str[i]; }If i...
View ArticleJune Lunch Time 2013
Can anybody tell me what is June Lunch Time 2013 ? I mean what is Contest Duration and number of Questions. Is it like Long Contest or Short or something in middle ?
View ArticleNeed explanation of a code..
Here is the problem linkSomebody plzz explain the solution of this problem given in the link below. I know this is not my solution, but i want to learn bit manipulation. Tried many self satisfying ways...
View ArticleTLE in June cook off 2013 Attic Problem-C++
Why does TLE show up?? Following code is in C++ 4.3.2#include<cstdio> #include<cstdlib> #include<cmath> #include<string.h> #define TMAX 1000007 #define PMAX 1000007 int main() {...
View ArticleINVITES - Editorial
Problem Link:PracticeContestDifficulty:MediumPre-requisites:Dynamic Programming, TreeProblem:Given N families, each of whom declares exactly one enemy among the remaining families, find how many ways...
View ArticleCHEFGAME-Wrong Answer
Getting WA.But am not able to work out any corner cases.Can somebody give me some test cases.Help?Code
View ArticleCook35 Rating Issue
i was able to successfully solve one question(ATTIC) from last night's Cook35. but strangely once the rankings were upgraded, i fell by almost a 1000 ranks and my rating decreased as well. how is that...
View ArticleSmall Factorials - C Code working on PC but wrong answer on codechef
For the problem Small Factorials I wrote the following C Code. It is working on my PC. I cross-checked the answer for 100! with a Python Script so answer is correct. I don't have any idea why this is...
View ArticleTYTACTIC - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:dfs, range sum queriesProblem:You are given a rooted tree T, associate with each vertex v a weight skill[v]. Also given are a set of queries...
View Article