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

MARBLEGF - Editorial

PROBLEM LINKContestAUTHOR@kurumaTESTER@white_kingSOLUTIONThis is a trivial application of Fenwick tree. Those not familiar with Fenwick tree may look at the topcoder editorial available here.All this...

View Article


Can somebody explain the dynamic programming approach in CIELRCPT?

Hi here's the link could somebody please explain the dynamic programming approach for this question given in the editorial..here's the link.. http://discuss.codechef.com/problems/CIELRCPThow to get eqn...

View Article


Help regarding the following code?

"Input The first line contains integer t, the number of test cases. Integers K are given in the next t lines. Output For each K, output the smallest palindrome larger than K."#include<stdio.h>...

View Article

What is it at the end of codechef pages?

I see something like this at the end of every page in codechef.TRACE: cc-strike start TRACE: you are logged in TRACE: cc-strike end DEBUG divToAdd.length (1)=0 DEBUG divToAdd.length (2)=0 DEBUG:...

View Article

Fastest read / write in java

I am using simple bufferreader but it is slow enough and due to this in some program i got time limit exceed problem . So guys tell me about fastest read and write code for java program.

View Article


Runtime error(NZEC) in byteland ques. (java program)

The following java program is showing runtime error(NZEC). Please help me to fix this. import java.util.*; class coins { public static void main(String args[]) { int i=10; int n=0; Scanner in=new...

View Article

runtime error(SIGSEGV) in byteland coins ques. Please help.

The following program is showing runtime error(SIGSEGV). Please help me to fix this.#include<stdio.h> int main() { int i=10; int n; while(i--) { scanf("%d",&n); printf("%d\n",calc(n)); }...

View Article

why Runtime Error(SIGSEGV) ???

solution of snake snaky http://www.codechef.com/problems/SNAKY#include<stdio.h> int move(int map[1001][1001],int l,char ch,int sx,int sy,int cord[][2],int &status,int &stat) { int temp=0;...

View Article


Book for probability and Permutation and Combination

I want to study Permutation and Combination and Probability . Will anybody suggest me a good book to follow ? Thanks! in advance

View Article


tester's solution of KMHAMHA.

Hello everyone. I was going through the solution of the tester of the problem of kamehameha. I understood the hashing part but the part i could not understood is the augment function. I mean yeah i...

View Article

CHODE - Editorial

PROBLEM LINK:PracticeContestAuthor:Vitalij KozhukhivskijTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:Programming LanguagePROBLEM:Given a simple encryption method using the...

View Article

Difference between getchar() & getchar_unlocked()

getchar_unlocked() is usually used to get faster input.But I have not understood the difference between the getchar_unlocked() and getchar(). Also, why is getchar_unlocked() faster and what does the...

View Article

GCD2 Problem : EASY

In solutions of participants most of them have divided each digit of the very large number(10^250) with the other number for finding HCF ?Any1 knows why is it so ? which algorithm is it ?

View Article


TLE in PRETNUM

It Is a very strange error. I have given max test cases each worst possible getting a runtime of 0.37 on ideone. The time limit is (1-2) still getting tle.One of the accepted solutions was run by me on...

View Article

Query regarding December rating update?

When the ratings after cook 41 will be calculated? Why the ratings haven't been calculated yet after dec13?

View Article


Help with Runtime Error in my Code

I am getting a runtime error (SIGSEGV) on my code and I don't know how to fix it. Please help. Thanks.Problem:http://www.codechef.com/problems/POINTSMy...

View Article

Image may be NSFW.
Clik here to view.

QTREE6 - Editorial

PROBLEM LINK:PracticeContestAuthor:Minako KojimaTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Link Cut Tree, Heavy-Light DecompositionPROBLEM:Given a 0/1 colored tree of N...

View Article


ACM ICPC onsite problems

@admin im wandering if the the replay of the ACM ICPC onsite regionals of kharagpur and amritapuri will be conducted on codechef as the problems are became public.if no replay will be conducted at...

View Article

Rectangular queries logic unveiled

I am a newbie on codechef and this problem(http://www.codechef.com/problems/RECTQUER)from Dec Challenge 2013 consumed my 4 days(solved it yesterday).So i thought it was worth to unveil the logic of...

View Article

getting SIGSEGV for MARBLES question

i am not sure why i am getting this error.please help.my code is given below.#include<stdio.h> double find_ncr(unsigned long long n,unsigned long long r) { if(n<r) return 0; else if(n==r)...

View Article
Browsing all 40121 articles
Browse latest View live