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

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 Article


code 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 Article


chefzot 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 Article

Play on words

How can i solve this problem.http://www.codechef.com/problems/WORDS1

View Article

holes :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 Article


Intializatio 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 Article

Is 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 Article

Segment 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 Article


reduce 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 Article


MAXPR-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 Article

Combinatorics 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 Article

Forgot 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 Article

NZEC 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 Article


runtime 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 Article

tlg: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 Article


Hamilton 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 Article

Weird 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 Article


JAVA 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 Article

MKSQR 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 Article

Time 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
Browsing all 39796 articles
Browse latest View live


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