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

strange matrix

how to allocate array of 10^5 in C int matrix[100000][100000]; shows error : size of array matrix is too large

View Article


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


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

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

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


Calculation of Memory ?

How is the memory of a problem is calculated?Can anyone tell me about the space complexities, how is that calculated?

View Article

TOURMAP doubt

I tried coding the solution of the problem using hashmap and vectors(not using graph),can someone pls point out the error in my code? Here is my code:http://www.codechef.com/viewsolution/3874881

View Article

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


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


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

memory issue

how to manage or lessen memory used by the programme??

View Article

how to start programming

i am new member at code chef,, i am unable to understand from where to start ?

View Article

TLE in spiral maze

can someone plz tell me why this code gives TLE for question(http://www.codechef.com/problems/TIC05): http://www.codechef.com/viewsolution/3874966 while it works fine on ideone and on my pc:...

View Article


Clarification needed in Chef and strange matrix (chefbm)

please clarify As per constraints 1 ≤ n, m. if n is 1 only one column. how cost can be calculated through a(i)(j) - a(i)(j - 1). As the cost of a movement is a(i)(j) - a(i)(j - 1).I am getting wrong...

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


NUMPY support

is numpy supported by codechef server????

View Article

LEBALONS MAY-14 LONG

I think there is an overflow at boundary condition. case ex. 1 40 0 1 1000000 1 1000000 upto 40 times. calculation will reach beyond the scope of greatest of data types like long long. should I assume...

View Article


graph and linked list

can we make a graph with doubly linked list?

View Article

Perl : time multiplier ?

Hello,I found this five years old post listing (interpreted/bytecoded) languages that have a multiplier for time limits. I cannot see Perl in that list.Blog post on time multipliersI have tried, with...

View Article

Approach to become Good Programmer.

I really want to know that whats the ideal approach for becoming a good programmer? Whats the secret to solve the Codechef questions? Any External links, online tutorials, e-books are welcome. ANY help...

View Article
Browsing all 40121 articles
Browse latest View live


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