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

rte in my code for delish

can anyone suggest changes in my code it is giving run time error,i beleive the the logic is correct but it gives sigsegv.problem: http://www.codechef.com/problems/DELISHmy code:...

View Article


finding subsets in an array

Pls suggest an algorithm to find the maximum no. of subset of length k in an array of length m where k<=m , having sum equal to a constant factor...e.g an array of length 112 5 1 2 4 1 6 5 2 2 1k=6,...

View Article


Sorting large array of long long int

Hey guys, i'm working on a problem where I have to sort large array of long long int ( array size of nearly 1000000). I've tried to do it with merge sort as it has a complexity of O(n*log(n)) in worst...

View Article

sigsegv in delish

can anyone suggest changes in my code it is giving run time error,i beleive the the logic is correct but it gives sigsegv.problem: http://www.codechef.com/problems/DELISHmy code:...

View Article

Want Some Test Cases for Little Chef And Numbers?

I tried Some of my own test cases,code working fine..but getting WA after submitting.. Can any one provide some test cases to check where Iam actually getting WA

View Article


doubt chef and cake

i have tried for many test cases my output is correct but it is showing waalso do the test cases include this type of input :20 20 1 130 30 11 11my code:...

View Article

sorting array of struct

hey why code is not able to sort on the basis of "e" when the inputs are : 100 4,4 5,200 6,2 5//JUST PRACTISING #include<cstdio> #include<iostream> #include<list>...

View Article

best way to sort an array

pleas can anyone tell me best way to sort an array.....also explain its algorithm and its working. best way means least complexity.

View Article


Test Cases Still Weak for SSTORY even after Re-judge

One of my solutions was still Accepted though it should give wrong answer. My code gave 'c' for s1="aecd" and s2="acad", where the answer should be 'a'.

View Article


can someone please explain the solution to this problem?

Can someone please explain to me what the logic behind the solution to this problem is:"A Simple Equation" - http://www.codechef.com/problems/EQUATIONI looked at a few solutions that produced the...

View Article

problem with contest configuration

hello,am getting problem with contest configuration error whenever i try to submit a solution.Are others also getting the same error?and what is this error?

View Article

BEX - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESStack Data StructurePROBLEMHarry has a lot of books messed on the floor. He keeps a pile of books. At any time, he can put a book that has some...

View Article

Three way communication giving wrong output on codechef

# include <stdio.h> # include <math.h> inline int scan() { char c = getchar_unlocked(); while(c < '0' && c > '9') c = getchar_unlocked(); int n = 0; while(c >= '0'...

View Article


what is o/p and explain why like that for below c program

{ float x=1.1; while(x==1.1) { printf("%f\n",x); x=x-0.1; } return 0; }

View Article

Suggestion: Custom testing for codechef

Just like we have custom testing for codeforces, why can't we have something similar for codechef also?This will solve the problem of ideone leaked solutions and will also be very helpful. :DJust my...

View Article


Extending MARCH14

Regrading of SSTORY that happened yesterday suprised me. I didn't have enough time available so I decided to do first six problems last week, and some more tonight. It all started out great, but now,...

View Article

how to know when to apply Binary indexed Tree??

Had been studying BIT past few days and have got the idea how does it work but unable to figure when it is used like how to know it is being used in http://www.spoj.com/problems/CTRICK/ and...

View Article


Interesting observation

I just noted that the top 2 guys in Indian ranking have the exact same long contest rating points, ranking and rating graphs. Coincidence...

View Article

MIKE 3 output

mine is able to give 12 for this test case ( http://discuss.codechef.com/questions/39472/just-reevaluate-mike3 ) but still WA... I am new on codechef plz tell what is output format for this problem?...

View Article

SIGFPE in March long Maximum number, GCD condition

I'm getting a runtime error in the probhttp://www.codechef.com/MARCH14/problems/ANUGCD/I've checked for array index boundsand the constraints clearly say that input can not be zer tooany suggestions?

View Article
Browsing all 39796 articles
Browse latest View live


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