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

Ambiguous Permutation Problem

Hello everyone. I tried the Ambiguous Permutation problem under the Easy category, and I've written a code that seems to be working perfectly but for some reason the website says it's the wrong answer....

View Article


Not a triangle

I am getting WA for the question:http://www.codechef.com/problems/NOTATRI/ Anyone plz. explain where i am wrong.Thnx. My code: http://www.codechef.com/viewsolution/2213497

View Article


LEBALONS - Editorial

PROBLEM LINK:PracticeContestAuthor:VitaliyTester:Sergey KulikEditorialist:Lalit KunduDIFFICULTY:EASY-MEDIUM PREREQUISITES:Combinatorics, Dynamic Programming, Probability PROBLEM:Given N ballons, i'th...

View Article

No editorial for SEINC

When will the editorial of May 14 long challenge Sereja and Subsegment Increasings(SEINC-May 14) be posted?

View Article

TLE in SPOJ: A Needle in the Haystack

Problem linkMy codeI have implemented the Rabin-Karp algorithm and still it's exceeding the time limit. Any suggestions for making it faster?

View Article


Cleaning Up runtime error

Hi, I was trying out Clean Up problem from Practice section, but this code I wrote is giving me an NZEC. I have no idea why. Code:from __future__ import division def read_mapped(func=lambda x:x):...

View Article

CLEANUP - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONNo real tricks here. An easy approach is to create a boolean array b[] of size n where item b[i] is true if and only if i does not appear in the...

View Article

Internet Problem Solving Contest

Well, most of us might be already knowing about this, but few wouldn't be, who are new to competitive programming, and related things... This post is basically for them :The Internet Problem Solving...

View Article


Sorry, my question isnt related to programming but willl feel delighted if...

Two of my screws fell on its own from my laptop, initially I didn't care much about it. But recently some damage happened to my laptop. Inspite of being in warranty the company is making excuses that...

View Article


how to see our results

how to see our results

View Article

WA - RRECIPE

Hi, I have been getting a WA for the solution of Recipe Reconstruction. The code can be found here http://www.codechef.com/viewsolution/3913508. Tried the basic test cases in the question and some of...

View Article

Strategy for Short contests

In most of the short contests I solve not more than 2 questions. I always keep asking myself how to perform better? I wanted to improve myself in the short contests. Can anyone suggest the best...

View Article

why we use **head_ref in this prog i am not able to understand the logic...

void push(struct node head_ref, int new_data) { / allocate node / struct node new_node = (struct node) malloc(sizeof(struct node));/* put in the data */ new_node->data = new_data; /* link the old...

View Article


SEINC - Editorial

PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Sergey KulikEditorialist:Lalit KunduDIFFICULTY:MEDIUM-HARD PREREQUISITES:Greedy PROBLEM:You have two array of N ≤ 105 integers A1,A2...AN and...

View Article

which compiler to select???

which compiler shall i choose to upload my code ????include<iostream.h>include<conio.h>void main() {double n; cin>>n; int i; i=int(n)%6; if(i==0||i==1||i==3) cout<<"yes"; else...

View Article


Doubt regarding TLE & Wrong answer

First when I submitted a code I got wrong answer, but when I changed slightly and resubmitted then I got TLE .I am sure that this code can not go to infinite loop after changing. So what might be the...

View Article

How wrong answer is displaying?

I am getting right answer on my system but when i am compiling it online on Chef's compiler then it is giving wrong answer. Why it is so?

View Article


TLG getting wrong answer!!!

http://www.codechef.com/viewsolution/3913938above is my code for TLG problem http://www.codechef.com/problems/TLG . Plz someone tell me why answer is wrong. it becomes correct if i add score of player...

View Article

A question about the SPOJ/Codechef online judge

Hi all,I have noticed that at Codechef, Time Limit Multipliers for non-imperative languages are set to 1 by default, i.e. if we define TL to be 1 sec, then the solutions coded in Haskell/Scala/Clojure,...

View Article

where to start solving graph theory problem

Hello everyone. I need some suggestions on where to begin solving graph theory problems. I have read some books and articles and am able to program bfs, dfs, spanning tree problems etc. But when it...

View Article
Browsing all 39796 articles
Browse latest View live