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

Windows.h for C++

When I code I always use windows.h for system("pause"), but when I upload my code to this site it always gives me a compile error. What did I do wrong?

View Article


COOKFOOD - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSimplePRE-REQUISITESRecurrences, Simple MathProblem:Chef is cooking two dishes, each one takes N processes to be prepared. Chef has K equipments which allow for K...

View Article


Math formula derivation help?? (COOKFOOD)

Can someone explain the math with an example on how (K-2)^2 + K-1 choices are derived?? This question is tagged as simple math but I'm not fully able to wrap the math part though i understand it in...

View Article

AMIFIB - Editorial

PROBLEM LINK:PracticeContestAuthor:Vineet PaliwalTester:Roman RubanenkoEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Fibonacci Property, Quick Sort, Offline Algorithm, Hash, Binary...

View Article

Handling large integers in C++???

While going through some successful submissions of Am I Fibonacci Number in COOK40, I have seen that some of them just use unsigned long long to store digits of the form of 1000 digits and still...

View Article


QMARKS - Editorial

Problem Link:PracticeContestDifficulty:Easy-MediumPre-requisites:Aho-Corasick, DPExplanation:In order to pass the first sub task it's sufficient to implement exponential-time brute force solution. In...

View Article

What's happening on codechef ?

In today's lunchtime contest , the site got offline for 10-15 minute . I click on poster of november cook-off on home-page , then october challenge pops up . I tried to open the today's lunch question,...

View Article

Image may be NSFW.
Clik here to view.

LMA1 - Editorial

Problem Link:PracticeContestDifficulty:EasyPre-requisites:Basic mathExplanation:Sub task 1:In this subtask the summands will decrease very fast because a is actually small, so it's enough just to...

View Article


Python 3.3 NZEC (Pairwise AND Sum)

import math import sys n = 1 cases = 0 num = 0 arr = [0 for i in range(0,30)] ans = 0 #print('Enter the test cases') cases = int(input()) while cases: num = int(input()) for i in range(0,30): if num %...

View Article


PALINDR - Editorial

Problem Link:PracticeContestDifficulty:Easy-MediumPre-requisites:Treap, CombinatoricsExplanation:The constraints in the first sub task are very small, so a simple brute force will be enough in order to...

View Article

NUMBERS - Editorial

Problem Link:PracticeContestDifficulty:CakeWalkPre-requisites:SortingExplanation:Sub tasks 1, 2, 3:The constraints in these subtasks are designed in such a way that it is possible just to check every...

View Article

November challenge

When will the winners blog get updated . As codechef has taken quite a bit of time to update ratings and now they are delaying in updating the blogs .. Is it for this time or will it be the case for...

View Article

Problem with Lowest Sums

Hello, I am getting an NZEC error when submitting my solution to the Lowest Sums problem under the easy category for the practice problems and I cannot understand why. Using both Visual Studio and...

View Article


programming contests

i think all the enthusiatic codechef users should have a look in this site,to know about various programming contests:->http://cplus.about.com/od/glossary/a/ten-contests.htm

View Article

Why dont we have a % of correctness in a question as in hackerrank?

We can find that available in TC and CF?I know that is not a must do stuff.But that would be nice to watch it.Secondly it would be nice to see how many test cases have failed as in hacker rank.I mean...

View Article


what is ioi style grading??

I am trying to solve problems from past ico's in ICO online judge.i solved a problem(NEXTPERM). After submission the solution was accepted but i scored only 20 out of 100.The judge is showing that my...

View Article

what is the runtime error in this solution for the question titled "factorial"?

include<iostream>using namespace std; void func(long int n) { long int sum=0; while(n) { n/=5; sum+=n; } cout<<sum<<"\\n"; }="" int="" main()="" {="" long="" int="" arr[100];=""...

View Article


Discrepancies in the Voters List- SIGSEGV error!! Please help

Discrepancies in the Voters List: link textCan any body please tell me why am I getting SIGSEGV error in this code: link textThe code runs absolutely fine on ideone: link textI've checked my code...

View Article

What is real difference between stack memory and heap memory?

I have heard of this stack and heap during my computer classes during the study of recursive functions and all.I have just reached my 2nd year...But i would like to know what is this stack and heap.Can...

View Article

Code does not run!

Hi guys, The last 3 or 4 programs that i tried submitting from the easy practice questions, run fine on mt machine (in Dev C++), but there is some or the other error when i try submitting it. It just...

View Article
Browsing all 40121 articles
Browse latest View live


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