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

Not got rank

Hello, I'm new on codechef and due to my poor English, I can't find the instructions about how to get short contest rating. I participate in February Lunchtime 2014 without regist in exam ( I don't...

View Article


Need an Explanation for the code.

I wrote a code like this#include<iostream> using namespace std; int main() { int w=32; int x=1<<w; int z=1<<32; cout<<"X : "<<x<<endl; //Case 1 cout<<"Z :...

View Article


Help in IGNUS14B

I'm trying to solve the problem Prime Palindromes(IGNUS14B) Link-http://www.codechef.com/problems/IGNUS14BI have used Manacher's algorithm in my solution.But it is not working for some cases...

View Article

CNPIIM says wrong answer, but I checked it!

Usually when it says "wrong answer," I double check everything because I know something is wrong. But in this case, on my last submission I had, what I believe, to be perfect answers.I went through the...

View Article

Sereja and permutation explaination

Can anyone explain me the output for http://www.codechef.com/APRIL14/problems/SEAPERM#comment-76557 . How are we getting the permutations?

View Article


Hard coding solutions

Suppose we have question with single integer as input and the input ranges from 0 to n where n is small. Is it ok to hard code answer for the inputs in the source code?

View Article

file program issue

digraph _OP_control_flow { graph [center=true, epsilon=".000001", pack=true, rankdir=LR, ratio=compress, sep=".5", size="5.83,8.27", splines=true ]; node [fillcolor="#fff9f9", shape=doublecircle,...

View Article

A story with strings

There was a competition here http://www.codechef.com/MARCH14 and there was a problem A story with strings I solved it and want to know if it is successful#include <iostream> #include...

View Article


Old Maid-Card Game

This program will use arrays to represent a simple card game; it will also use functions to organize the code into a structure easy to write and debug. SPECIAL ASSIGNMENT REQUIREMENT:A Better...

View Article


how to reduce time limit exceed?

when i submit a problem sometimes it shows time limit exceeds . so how can i reduce my time limit and how can i make it efficient

View Article

Code faster?

In many short contests on code chef speed is of immense importance how can I improve my coding speed without altering the logic?

View Article

reducing execution time of program

what are the optimisation approaches which one can use to get rid of 'time limit exceeded' problem during submitting code?

View Article

Challenge problem scoring

Hi. I would like to know, when we have more than one accepted solutions to challenge problem, does the system test them all with final tests and count the highest one, or it tests only the last...

View Article


How to deal with SIGXFSZ error

This question has been asked here before and I understand what the error means. The question which is giving this error expects 5000 lines of output (at max) so I figure the method by which I output...

View Article

getchar vs scanf

can any one tell me the difference b/w int a[n]; for(int i=0;i<n;i++)<br> { a[i]=getchar()-48; } andint a[n]; for(int i=0;i< n;i++) { scanf("%1d",&a[i]); }

View Article


TANGLED - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYHardPRE-REQUISITESSuffix ArraysProblem:As stated on the problem statement:For a string S=c1 c2 ... cN, let S[a,b] denote ca ca+1 ... cb-1 cb, that is, the...

View Article

TRIPCOST - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEasyPRE-REQUISITESBinary Search, Greedy algorithmsProblem:Chef is travelling to rest from his hard work at his restaurant chain. For this Chef decides to visit N+1...

View Article


COINCHNG - Editorial

PROBLEM LINKSPracticeContestPRE-REQUISITESBinary Search, Greedy algorithms, dynamic programmingProblem:The currency of Dholakpur is in the form of notes of values 1, C, C2,... You always pay any amount...

View Article

How to solve graph question

I am a beginner in Graph. I solve problem of other tag but when i saw Graph tag then I unable to solve it. Some time i understand the approach but unble to implement the code.Please suggest me way to...

View Article

Doubt regarding time limit

time limit is given 1 sec and my code time shown is 11 sec.Still it is accepted. question code is BINTREE from April Challenge 2014! please explain!

View Article
Browsing all 39796 articles
Browse latest View live


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