LEBALONS 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 Articlewap in c# for the following question.
wap to identify the occurrence of 3 consecutive integer in n numbers and replace them with middle value by deleting the other two
View ArticleString addition
Can someone please tell how to add two strings indexwise without using the loop method?What i mean is: if I have string A; where A is of length 4 and values: '1', '12', '12', '10' ans string b; where b...
View Articleruntime error in chef jumping
hi...i submitted my code in c language written in codeblocks. But it is showing runtime error.what should i do?
View Articlehow bob is winning???(NUMGAME 2)
can u explain me how BOB is winning when N=7; accrding to me-first chance: bob would take out from N prime number 5..ie..(N-5)so new N is 2. second chance: alice would take out 1 and would certainly...
View ArticleTwo Sat Problem
Two SatIn this problem we must solve the satisfiability of logical formulas which consist of two propositions, without denying or denied joined by OR. There are also several of these formulas, consider...
View ArticleChef -Jumping
Can anyone tell me input in chef-jumping "a" is must be given static or it can be taken from user using scanf or something..coz I dont know how code chef's script run the program and directly give...
View ArticleChef Jumping
Getting NZEC error... Working in C... http://www.codechef.com/viewsolution/3865381 Any help??
View ArticleRuntime Error
Please explain Why i get SIGSEGV error and give some tips to remove SIGSEGV error from the code.
View Articlelittle elephant and balloons doubt
What should we print for 0/0 case? For example consider this case:12 41 21 5here number of possible subsets are zero and total cost is also zero.
View ArticleDoubt regarding TLE & Wrong answer
First when I submitted a code I got wrong answer, but when I changed slightly and resubmitted then I got TLE .I am sure that this code can not go to infinite loop after changing. So what might be the...
View ArticleTime limit exceeded in Ojumps
I am getting TLE.Can anyone give idea on how to optimize?
View Article