Quantcast
Browsing all 40121 articles
Browse latest View live

LEFEED - Editorial

Problem Link:PracticeContestDifficulty:MediumPre-requisites:ProbabilityProblem:Given integers N and M, and an array C having N elements in the range [0, M], you replace every 0 in the array with an...

View Article


march long - FIRESC

question:- http://www.codechef.com/MARCH13/problems/FIRESCmy solution :- http://www.codechef.com/viewsolution/1930307can anyone help me.... I am getting WA....thank you in advance

View Article


Splitting the set of numbrs into n partition

How can we split the set of numbers in n parts. For eg set {1,2,3,4,5,6}, we have to split it in 3 parts using all the elements for eg valid split could be {123,45,6} , {14,23,56} , {13,245,6} etc.

View Article

What's the name of this technique?

I am reading some solutions of the problem AMSTRING (from this April's cook off). It seems that most solutions (including setter's one) use same loop structure like this.for(d=1-n;d<n;d++) { .... }...

View Article

AMMEAT - Editorial

Problem Link:PracticeContestDifficulty:CAKEWALKPre-requisites:ad-hocProblem:You have N plates of meatballs, the ith having Pi meatballs. What is the minimum number of plates you need to choose so that...

View Article


AMMEAT2 - Editorial

Problem Link:PracticeContestDifficulty:SIMPLEPre-requisites:Ad-hocProblem:Given integers N and K, pick K integers in 1...N, such that no two chosen integers are relatively prime.Explanation:Let us try...

View Article

STRQUERY - Will rope work here?

Will Rope Data Structure work on the problem String Query in April '13?? And is there any good tutorial on it??

View Article

Why do I get an NZEC?

Why m i getting NZEC (Non Zero Exit Code) for my program?

View Article


Broken necklace(USACO training gateway)

hi everyone, I try to solve "Broken Necklace" problem in USACO training. problem is: Broken Necklace the problem link You have a necklace of N red, white, or blue beads (3<=N<=350) some of which...

View Article


God Code.....

A code Which can solve all problem of a contest...Guys this is a very interesting code for this contestThe code is int main() { int d, T =1; while(scanf("%d",&d)!=EOF) { printf("Case #%d: \n", T);...

View Article

runtime error in prime palindrome problem

http://www.codechef.com/viewsolution/2062157 what is wrong with my code? on submission,its coming runtime error..

View Article

python basics

please provide me links where i could learn basics of python :)

View Article

CHEFGAME - Editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Hiroto SekidoEditorialist:Anton LunyovDIFFICULTY:MEDIUMPREREQUISITES:Prim's algorithmPROBLEM:The best described in the problem statement.QUICK...

View Article


sweep line / largest polygon

Hi, I have a set of segments and I have to calculate the area of the largest polygon which can be build using this segments (the polygon must be enclosed)… sounds like a sweep-line problem but I have...

View Article

Compilation Error

My program runs perfectly fine on my pc. But while submitting it on code chef, it shows a long list of compilation errors. I am a first time submitter... please review my code and help! :) By the way,...

View Article


STRQUERY - Editorial

PROBLEM LINK:PracticeContestAuthor:Tom ChenTester:Hiroto SekidoEditorialist:Anton LunyovDIFFICULTY:HARDPREREQUISITES:Suffix array, Treap, Knuth–Morris–Pratt algorithmPROBLEM:You are given a string S of...

View Article

wrong answer couldn't get it correct,I am a newbie

#include<stdio.h> int main() { int v,a,temp,arr[10001],t,k,c,i,j; v=0; scanf("%d",&t); while(t--) { for(a=0;a<10001;a++) { arr[a]=0; } scanf("%d",&i); for(j=0;j<i;j++) {...

View Article


input output

wat are the faster ways of input outputs in c???? thank u

View Article

Golden Trees - ZNEC Runtime error

Please help me find why I got ZNEC runtime error. When I compiled and ran it, it was fine, but when I submitted, it got an error. I spent several hours and did not find the bugMy code is here

View Article

AMMEAT2 problem

Please Help!! please point out the error in my solution.... i guess mine answer is working fine for every test case. Submission Id- 2066648 User Id - priyanshuid Thanks in Advance......

View Article
Browsing all 40121 articles
Browse latest View live


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