Quantcast
Browsing all 39796 articles
Browse latest View live

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 Article


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


error time

why error time this some code?

View Article

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

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


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

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

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


Learning !!

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


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

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

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

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


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

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


Chef Jumping

Getting NZEC error... Working in C... http://www.codechef.com/viewsolution/3865381 Any help??

View Article

Runtime Error

Please explain Why i get SIGSEGV error and give some tips to remove SIGSEGV error from the code.

View Article


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

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

Time limit exceeded in Ojumps

I am getting TLE.Can anyone give idea on how to optimize?

View Article
Browsing all 39796 articles
Browse latest View live


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