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 Articlemarch 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 ArticleSplitting 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 ArticleWhat'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 ArticleAMMEAT - 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 ArticleAMMEAT2 - 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 ArticleSTRQUERY - 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 ArticleBroken 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 ArticleGod 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 Articleruntime error in prime palindrome problem
http://www.codechef.com/viewsolution/2062157 what is wrong with my code? on submission,its coming runtime error..
View ArticleCHEFGAME - Editorial
PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:Hiroto SekidoEditorialist:Anton LunyovDIFFICULTY:MEDIUMPREREQUISITES:Prim's algorithmPROBLEM:The best described in the problem statement.QUICK...
View Articlesweep 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 ArticleCompilation 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 ArticleSTRQUERY - 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 Articlewrong 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 ArticleGolden 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 ArticleAMMEAT2 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