ANUDTC - Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:CAKEWALK PREREQUISITES:AD-HOC PROBLEM:Given a circle, you can make cuts at positive...
View Articlecode problem
This is a code about entering the no. of test cases and finding the factorial of each case.....but the codechef is not accepting this answer, can anybody please tell me whats wrong in this...
View Articlechefzot problem
Hi, I've done CHEFZOT problem It's givving wrong answer when submitted.I've seen editorial and my solution is bit different but givving exact output on all the given test cases.Please tell me why it's...
View Articleholes :getting wrong answer
include<stdio.h>include<string.h>int main() { char a[100]; int test,i,len=0,count=0;scanf("%d",&test); while(test--) { scanf("%s",&a); count=0; len=strlen(a); if(len<=100) {...
View ArticleIntializatio problem
Here i made a class rational to add, subtract, multiply and divide 2 rational numbers. But data members not able to take the values through constructor. I don't know what's the problem. I am sharing my...
View ArticleIs there any algorithm for "Longest increasing subsequence" with complexity...
I just want to know that while using dp for Longest increasing subsequence we get a complexity of O(n^2). Is there any other algorithm by which we can reduce the complexity??? Please explain the algo...
View ArticleSegment tree programming
Hi guys, I need some help implementing segment tree algorithm (Implementing RMQ in segment tree). I read the topcoder tutorial and tried implementing myself. But I made a mistake somewhere. Here is the...
View Articlereduce string
wats the problem with this code for reduce string problem given in hard practice section please tell?include<stdio.h>include<string.h>int main() { int count[256]={0},i,j=0,n,k=0; char...
View ArticleMAXPR-Wrong Answer
I can't seem to find out why my answer is wrong, can someone give me a sample input for which my program prints an incorrect answer, please? Here's the link to my solution....
View ArticleCombinatorics in Competitive Programming
Since the beginning of my preparation for competitive programming I have seen number of problems based on most important topic of mathematics, that is, combinatorics. Can someone point out a good...
View ArticleForgot Password input test cases
Hi all, since the competition is over, can someone please provide with sample input cases, my code is surely failing for just 1,2 cases, i have tried every case but its working for me. If someone can...
View ArticleNZEC error
i have devoted my whole day in solving this but getting NZEC error .i checked for so many testcases Plz check it at below linkMysolution :-...
View Articleruntime error in c++
what is wrong with my code? it shows runtime errorinclude<iostream>using namespace std; int main() {int t,a,b,i,c; cin>>t; if(t>=1&&t<=100) { for(i=0;i<t;i++)...
View Articletlg:wrong answer
i am getting wrong answer for the lead game question hereso please help me!!include<stdio.h>int main() { int n,s[10000],t[10000],i,r,l[10000],w[10000],max,win;scanf("%d",&n);...
View ArticleHamilton path or Euler path
http://www.codechef.com/problems/WORDS1Does this question needs Hamilton Path or Euler Path. In my opinion it needs Hamilton Path but then how can we solve this ???
View ArticleWeird result when using map in June14 question "Forgot Password"
For this question, I first used a map<char,char> for doing the replacement according to the rules.map<char,char> m; m[ci] = pi; Did not work. After a lot of struggling, I finally thought of...
View ArticleJAVA NZEC
hey my program is giving me correct output on my netbeans IDE but while i submit it on codechef then it gives NZEC error please help me that what have did wrong in it here is my code...
View ArticleMKSQR please suggest the logic?
http://www.codechef.com/problems/MKSQR i am not getting d logic to solve this question. I thought it has something to do with linear independence of vectors but i guess i am wrong, i need only a slight...
View ArticleTime efficient lcs computation
I am trying solving http://www.spoj.com/problems/LCS0/. The normal dp solution will certainly not work. I also tried for the space efficient solution in which we keep track of two rows only. But as the...
View Article