Little Elephant and Balloons
could you please explain the 2nd test case of LEBALONS problem ?2 1 1 42 7output : 7.333333333
View ArticleLittle Elephant and balloons
Does the probability of every subset would be same or it can vary due to same color of balloons?? example :13 11 22 32 4subsets are : {1}{2}{2} {1,2} {1,2} {2,2} {1,2,2} so the probability of each...
View Articledynamic memory allocation in case of arrays
Hi, does codechef allows dynamic memory allocation of arrays ? I'm new to it , so please anyone help.
View Articleover flow in FUNAGP
As limits of R is [1,10^9], so even (S+2D)*R^2 has the chance of integer over flow if R is 10^9 (long long int in c). So do we have to do (% 1000000007) each time? And is it required to print an empty...
View Articlejudge not working ???
My solution submission page is just showing running image for 20 minutes. I have checked the My Submissions tab too..
View ArticleCompiler and parsers
Should the sequence always begin with "<" Is the answer to the input ><> 0 or 2?
View ArticleModulo 10^9 +7
Why are we ask to take modulo 10^9 + 7 (1000000007) in many problems? What is the arithmetic logic behind it can anyone clear it out?Thanks!
View ArticleWhy this nput works in TEST problem
I was going through practice and saw that following when entered as TEXT was accepted as successful submission. Is it Bug or something else. Enter the following as TEXT instead of other language from...
View Articlestrange matrix
how to allocate array of 10^5 in C int matrix[100000][100000]; shows error : size of array matrix is too large
View Articlewhy nzec error coming????????????
#include<stdio.h> #include<stdlib.h> void main() {int a=0,m; scanf("%d",&m); while(a<m) {if(a==m) {printf("YES"); exit(0);} a=a+1; if(a==m) {printf("YES"); exit(1);} a=a+2; if(a==m)...
View ArticleThe lead game...Why do i get wrong answer
include <stdio.h>int main(int argc, const char * argv[]) { int numberOfRounds = 0; int playerOne[10000], playerTwo[10000];scanf("%d", &numberOfRounds); if(numberOfRounds <= 10000) {...
View ArticleThe Lead Game Wrong Answer
I can't figure out way i'm getting wrong answer. I've tested the program both with the sample input and a random input. Here's the code. include <stdio.h>int main(int argc, const char * argv[]) {...
View Articleproblem in Sereja and Subsegment Increasings
if in a single step, even after choosing any two indexes, a is not equal to b. then what we have to do with array A to proceed to second step.like if A=[1,1,1,1,] and B=[3,3,3,3]. Can any one explain...
View ArticleCalculation of Memory ?
How is the memory of a problem is calculated?Can anyone tell me about the space complexities, how is that calculated?
View ArticleHaving Problem in submission
I run the code for more than 20 times, its showing the same output as given in the problem but in the submission page its showing "Wrong Answer"......
View ArticleBeginner doubt may long challenge
On the competition page it is given that the scores during competition are partial (20% test data).. and solutions will be rejudged. I wanted to ask what about the time limit??? what if someone's...
View Articlelittle balloons
my solution is showing wrong answer. i am getting output: 11.0 7.333333333333333is it possible that this may be reason of rejection. do they require output exactly as : 11.000000000 7.333333333 ?????????
View Articlehow to start programming
i am new member at code chef,, i am unable to understand from where to start ?
View Article