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

Tips for a Project Euler problem (number 160)

Hello @all,Now that exams are more or less behind my back (at least, until January), I have decided I would return to Project Euler to learn a new language (I've chosen Haskell, as some of you might...

View Article


CHODE - what is wrong with this code?

I have submitted it around 40 times, with minor changes in each submission, but it ended up in WA every time. I'm not able to detect the error in my code. It does this -fs=qwrtyuipasdfgjkzxcvbnmheol...

View Article


Using fflush gives WA

These two codes are the same: code1 and code2, the only difference being that I have used fflush(stdin) in the second code to omit the newline character while taking two strings as input one after the...

View Article

QTREE6 weak test cases

Please check the testcases for problem QTREE6 and take a look at my solution.

View Article

what is buffer

actually what is buffer why the values will be stored in buffer during programming

View Article


What is happening on Codechef?

The submissions are not evaluated in within the proper time...:( It is still checking...I submitted the code 3 minutes before...:( I am not saying this to provoke anyone... Please check this matter...

View Article

Difference between getchar() and getchar_unlocked()

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

View Article

Access Denied December Cook-Off 2013

@admin: Again getting access denied error on problems page. Home » Compete » December Cook-Off 2013 » Chef Goes Through Segments You are not authorized to access this page.

View Article


problems of Dec cook not found in practice session?

not able to view them as practice prolems in the link : for eg: http://www.codechef.com/problems/GERALD04

View Article


GERALD3 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Suffix Array, Longest Common Prefix, Balanced Binary Search Tree,...

View Article

GERALD06 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Graph Theory, Line GraphPROBLEM:Given a line graph L corresponding to a...

View Article

CIELRCPT - Editorial

PROBLEM LINKPracticeContestDIFFICULTYCAKEWALKPREREQUISITESGreedy AlgorithmsPROBLEMYou need to find the representation of a given integer N as a sum of powers of two up to 211 with the smallest number...

View Article

GERALD03 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:SimplePREREQUISITES:GreedyPROBLEM:Given a sequence of intervals [Li, Ri], try to transform...

View Article


runtime error why running right on my pc

#include<stdio.h> void main() {int t,dist,output,j,i; char a[6],b[6]; scanf("%d",&t); for(i=0;i<t;i++) { scanf("%s",a); scanf("%s",b); scanf("%d",&dist);...

View Article

can you tell me what is wrong with this code

it is showing runtime error on ideone here's the codeinclude<stdio.h>void main() {int t,dist,output,j,i; float k; char a[6],b[6]; scanf("%d",&t); for(i=0;i<t;i++) {="" scanf("%s",a);=""...

View Article


how to reduce time taken by following program....getting tle error

#include<stdio.h> #include<math.h> void check(int num) { int i,flag; if(num==2) { printf("2\n"); } for(i=2;i<=((int)(sqrt(num))+1);i++) { if(num==1); else if(num%i==0) { flag=1; break; }...

View Article

GERALD05 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dynamic Programming, CombinatoricsPROBLEM:Given a lot of objects,...

View Article


run time error why

please can you tell the error in the code #include<stdio.h> void main() {int t,dist,output,j,i; float k; char a[6],b[6]; scanf("%d",&t); for(i=0;i<t;i++) { scanf("%s",a); scanf("%s",b);...

View Article

Help on range updates in Segment Tree

Can anyone please tell me how to update an interval in segment tree?

View Article

Gerald 04- december cook off

Whats wrong with the following code : http://www.codechef.com/viewsolution/3124731 I am doing exactly the same way mentioned in tutorial . Question's link :...

View Article
Browsing all 39796 articles
Browse latest View live


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