test cases for Chef-jumping
I am currently working on the May contest Chef-jumping problem. I tried all the possible cases upto 7 digits input and GETTING THE DESIRED CORRECT OUTPUT on my terminal. But the codechef compiler...
View ArticleExplain it ?
According to definition of prefix on Wikipedia :" A proper prefix of a string is not equal to the string itself."so how for "test case 1: <<>> " answer 4 is possible ? plz explain if i am...
View ArticleUnable to post doubt on problem page
I have a certain doubt in the problem of current ongoing contest but I am unable to post doubt on the respective problem page.I've tried it several times but always a message pops up showing that my...
View Articlewhy i am getting wrong answer in this code for farmer feb problem
include<stdio.h>int main() {int t,x,y,i,c=1,j; int p=0; scanf("%d\n",&t); while(t--) { scanf("%d%d",&x,&y); for(i=y+x+1;i<2010;i++) { for(j=2;j<i;j++) { if(i%j==0)...
View Articlei want to know how this is runtime error sissegv
for(i=0;i<n;i++) { b[i]=0; for(j=0;j<m-1;j++) { if(a[i][j]>a[i][j+1]) {b[i]=-1; break;} } }
View Articlewrong answer
Hi everybody, I just coded for May'14 challenge, whose problem title is chef jump. I've coded it in my own editor and ran it through terminal(I use linux). It ran very well. I copied and pasted the...
View ArticleSTONES - WA
Hi..I have been getting WA for the STONES problem even though the mentioned test cases and some of my own are passing. Can somebody please have a look and see if I have missed any boundary condition or...
View Article[Stone Prob] Anyone clearify doubt in problem statement
whether the MAX calculation and (MAX-Ai) operation has to be perform for every of K turn???
View Article:'( Why I'm getting TLE in the problem "Compilers and parsers"??
I tried so many tricks to get AC, for example: check if the first char is a '<' (else the answer is 0), another is: check if the string ends in a substr of type "<<<<" if it is I'm going...
View ArticleChef and strange matrix (chefbm)
the p commands will always be in increasing order right ? or is it possible that some input can be like this one also4 4 62 23 22 34 34 43 1
View Articlegetting input and output ?
Hi coders, I am new to CodeChef.I am participating in May Challenge 2014. I am able to solve problem and getting correct answer in my pc. But codechef says it is wrong. I think my I/O is problem....
View ArticleLEBALONS doubt
HelloMaybe it's too obvious or something everyone would have learned but I have been reading the LEBALONS problem over and over again but I am unable to comprehend this: What does expected cost of gift...
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 ArticleWA in RRSTONES may long challenge
I know it is an ongoing contest, so answer my question only after the contest gets over; I've tried solving RRSTONES considering all corner cases but still getting WA. Can anyone please tell me where I...
View ArticleWA in RRSTONES may long challenge
I know it is an ongoing contest, so answer my question only after the contest gets over; I've tried solving RRSTONES considering all corner cases but still getting WA. Can anyone please tell me where I...
View ArticleWA in HOLES
www.codechef.com/problems/HOLESThe following code gave WA.include <iostream>using namespace std;int holesCalc(char c) { int hole; if(c=='A' | c=='Q' | c=='D' | c=='O' | c=='P' | c=='R') hole=1;...
View ArticleWA in Fibonacci Number
http://www.codechef.com/problems/AMIFIBThe following code is working perfect on my Dev C++ interface, but Codechef gives WA.include<iostream>using namespace std;int fibonacciCheck(int n) { int c;...
View ArticleDepth First Search not working
#include< stdio.h> #include< stdlib.h> struct node{ int vertex; int initial,end; struct node *next; } *arr[50], *p, *q, *p2, *p3; int visited[50]={0}; int t=1; void DFS_main(int); void...
View ArticleLearning !!
Hello everyone!! I have started learning algorithms and data structures.After learning each topic i want to solve examples related to that specific algorithm.So how can i search or know that an...
View Article