Quantcast
Channel: CodeChef Discuss - latest questions
Browsing all 39796 articles
Browse latest View live
↧

TRANSFIG - 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 Article


INVITES - 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 Article


ALETHIO problem query

#include <cstdio> #include <cctype> #include <cstring> #include <cstdlib> using namespace std; int main() { char s[1001]; scanf("%s", s); int length = strlen(s); int maxnum = 0;...

View Article

Lunch Time June 2013

Is this some new contest by codechef? Whats the contest format? Link : http://www.codechef.com/LTIME01

View Article

ALETHIO - Editorial

Problem Link:PracticeContestDifficulty:EasyPre-requisites:ad-hocProblem:You are given a string of digits 0-9, and uppercase letters 'A'-'Z'. Given that you are allowed to modify atmost one letter to...

View Article


attic 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",&times); for( i=0;i<times;i++) { char...

View Article

TYTACTIC - 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

CHEFGAME-WA

I was getting WA for CHEFGAME after implementing Prim as in the editorial.Could somebody tell where am I going wrong?Code

View Article


Submission of a solution after an event ends

Please tell me where can I submit the questions asked in long event or cook-off after the event has ended.

View Article


WA 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 Article

June 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 Article

June cook off 2013 Attic Crossing Problem

here is my code ..!import java.io.*;class Attic { public static void main(String args[])throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in));int t,arr,days,max;...

View Article

ATTIC problem

Can u tell me whats wrong with the code below , the code is accepted but giving an execution time of 2.53 sec ! How can i optimize it ? Provide some tips !int main(){ int t ; cin>>t; getchar();...

View Article


come on somebody pls answer this question.Is it necessary that a file created...

pls give appropriate explanation supporting your yes/no

View Article

Solve 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 Article


same 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 Article

why 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 Article


getting 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 Article

Need 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 Article

Finding lowest common ancestor in Binary Tree

This is not like other Codechef questions but still very interesting. How do we find lowest common ancestor in Binary Tree in O(n) time provided that you do not have any extra memory to store parent...

View Article
Browsing all 39796 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>