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

Dynamic Programming

I would like to know if I have overlapping subproblems in my solution for the problem http://www.geeksforgeeks.org/dynamic-programming-set-3-longest-increasing-subsequence/Here is my recursive solution...

View Article


LEDIV WA error on judge n correct on ideone

i am getting correct answer on ideone and my compiler but on judge it gives WA..please help..#include<stdio.h> long int a[100000]={0}; int main(void) { long int t,n,i,min,flag,j,res; min=100000;...

View Article


SIGSEGV:NUKES. Can someone please point out why my code gives SIGSEGV

Here's the code../*NUKES*/ #include<stdio.h> int main(void) { unsigned long long a,n,k; unsigned int arr[105]={0}; unsigned int i=0,j; scanf("%llu%llu%llu",&a,&n,&k); while(a) {...

View Article

APPROX2 getting WA

Can somebody give me a test case for which my code is not giving correct answer? My code http://www.codechef.com/viewsolution/4110093

View Article

KNPSK - Editorial

PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Tasnim Imran SunnyEditorialist:Praveen DhinwaDIFFICULTY:EASY-MEDIUMPREREQUISITES:greedy, sortingPROBLEM:You are given N items, each item has...

View Article


COMPILER - Editorial

PROBLEM LINK:PracticeContestAuthor:Bruno OliveiraTester:Sergey KulikEditorialist:Lalit KunduDIFFICULTY:EASY PREREQUISITES:AD-HOC PROBLEM:Given a bracket sequence, print the length of largest prefix...

View Article

turbo sort. I am getting a time limit exceeded for my code. how should i...

include<stdio.h>int main() { int t,i,j,temp=0; scanf("%d",&t); int a[t]; for(i=0;i<t;i++) {="" scanf("%d",&a[i]);="" }="" for(i="0;i&lt;t;i++)" {="" for(j="0;j&lt;t-1;j++)"...

View Article

LEBLOCKS - Editorial

PROBLEM LINK:PracticeContestAuthor:Vitaliy HerasymivTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:MediumPREREQUISITES:expectation value, dynamic programming, simple...

View Article


the lead game ..why am i getting wrong answer ...??? plzzz help :(

include<stdio.h>int main() { int n,i,leader,sum1=0,sum2=0,largest,l=0; scanf("%d",&n); int ply1[n],ply2[n],lead[n]; for(i=1;i<=n;i++) { scanf("%d",&ply1[i]); scanf("%d",&ply2[i]);}...

View Article


Count of Maximum... Why my code is not accepted? Please help... :)

My Code...http://www.codechef.com/viewsolution/4087597

View Article

plz help...how to solvethis question..???(abc string)

http://www.codechef.com/problems/ABCSTR (link of question)

View Article

How to delete my CodeChef user name / account

I would like to delete my CodeChef user name/ account, please let me about the same ?

View Article

CIEL8STR - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONLet S[a..b] denote the substring from a-th character to b-th character of S.One of the solutions for this problem is to use the fact that 1000 is...

View Article


the lead game.....why am i getting wrong answer for my code..???

include<stdio.h>int main() { int n,i,leader,sum1=0,sum2=0,largest; scanf("%d",&n); int ply1[n],ply2[n],lead[n]; for(i=0;i<n;i++) { scanf("%d",&ply1[i]); scanf("%d",&ply2[i]);}...

View Article

std::scanf vs std::cin

Which is to be prefered much in codechef?

View Article


WA in FLIPCOINS

problem :: http://www.codechef.com/problems/FLIPCOIN/ SOLUTION :: http://www.codechef.com/viewsolution/4168860I am again and again getting wa... initially i used segmented trees with no lazy...

View Article

MSTICK - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESRange Minimum Query, Simple MathPROBLEMYou are given N matchsticks arranged in a straight line, with their rearends touching each other. You are...

View Article


How to use meet in the middle technique?

Can anyone write a tutorial on this technique?

View Article

getting WA in lebombs

here is my code. pl tell me where its going wrong. tried all test cases I could think of.code

View Article

MAXPR - Editorial

PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:EasyPREREQUISITES:dynamic programming, simple combinatorics.PROBLEM:Given an array A. You have...

View Article
Browsing all 39796 articles
Browse latest View live


Latest Images

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