why is my approach wrong ?? knapsack problem
http://www.spoj.com/problems/PARTY/i know this approach is not correct but why ???//Data Structure includes #include<vector> #include<stack> #include<set> #include<map>...
View ArticleProblem in the code for the question: Feb Cook-Off 2014 - Chef and Reunion
For the problem in the February Cook-Off 2014 - Chef and Reunion we need to calculate the number of inversion in an array so i tried to apply an algorithm using merge sort and calculating the number of...
View Articlecan 0-1 knapsack be implemented using 1D array??
I found implementation using 2D array. But how to implement it using 1D array and if it is not possible then why???
View ArticleCOLARR-Editorial
PROBLEM LINK:PracticeContestAuthor:Dmytro BerezinTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:EasyPREREQUISITES:Ad-hoc, SortingPROBLEM:We are given a list of N cells, and a...
View Articlelong contest ranking
http://www.codechef.com/users/raul1rnjn535_3 My rating in long contest has increased as per the performance graph but my net rating is shown as 0 & my ranking is NA...why???I am very curious..
View ArticleTWODOGS-Editorial
PROBLEM LINK:PracticeContestAuthor:A Surya KiranTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:EasyPREREQUISITES:Ad-hocPROBLEM:Given a list of integers A and an integer k, pick...
View ArticlePrayaas-Microsoft Coding Contest in Technex'14
IIT(BHU),Varanasi 's annual Techno-management fest: Technex 2014, in association with Microsoft, presents PRAYAAS, a 4-day long programming challenge.Here contestants have to re-invent the existing...
View ArticleLPAIR - Editorial
PROBLEM LINK:PracticeContestAuthor:Shiplu HawladerTester:Tasnim Imran SunnyEditorialist:Lalit KunduDIFFICULTY:EASY-MEDIUM PREREQUISITES:MergeSortBinary Indexed TreePROBLEM:There are N males and N...
View ArticleFCTRL:getting wa
#include<iostream> #include<cstdio> using namespace std; int main(){ int TC,i,count=0; unsigned long ip; scanf("%d",&TC); while(TC--){ i=5; scanf("%lu",&ip); while(i<=ip){...
View ArticleLEMOVIE-Editorial
PROBLEM LINK:PracticeContestAuthor:VitaliyTester:Hiroto Sekido, Gerald AgapovEditorialist:Ajay K. VermaDIFFICULTY:Easy-MediumPREREQUISITES:Dynamic programming, CombinatoricsPROBLEM:Given an array A of...
View Articled query spoj
Was trying to solve http://www.spoj.com/problems/DQUERY/ but could not get it how to solve it , though i know Segment tree and have read solution...
View ArticleIn what case does my approach fail?
It's about the problem Draughts. I just can't find a case, in which the output is wrong. Can anybody give me a clue? Here's my solution: http://www.codechef.com/viewsolution/3450734
View ArticleCompetitive Programming proposal on SE
Competitive programming proposal on StackExchangeQ & A on Stack Exchange.
View ArticleRanking Not Got
I am new on codechef and i did not get my rank.It shows it did not get country code.So how can i get that?
View ArticleSearching particular Problem in practice section
I want to submit solution of one of the problem that was there in past contest. Now it is shifted to practice section . How do I search for that problem ? does codechef have any search engine for that?...
View ArticleHow to read string with whitespace in C++?
Hi, I just want to know how I can get a string from stdin which contains whitespaces? I tried fgets and scanf("%[^\n]",str) but it's still not working
View Articlewrong answer holes in text
#include<iostream> #include<stdio.h> #include<string.h> using namespace std; int main(){ int z[40],r,q,c=0; char p[100]; cin>>q; for( int i=0;i<q;i++){ gets(p); r=strlen(p);...
View ArticleWA in CINEMA of codemutants
i don't understand why this solution of mine is giving WA. works perfectly on ideone.include<stdio.h>main() { int t,test,m,n,p,q,i,j,k,l,flag=1,x,y,c=0; char a[1005][1005]; int ma[1005],na[1005];...
View Article