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

ATM problem please tell whats wrong..

x,y=input().split() y=float(y) if(x>0andx<=2000)and(y>0andy<=2000)and(float(x)+0.5<=y)and(x%5==0): y=y-x-0.5 print("%.2f"%y) else: print("%.2f"%y)

View Article


i am not getting this unexpected output..can u explain it??

#include<stdio.h> #define FUN(arg) do\{\ if(arg)\ printf("CODECHEF...", "\n");\ }while(--i)\ int main() { int i=2; FUN(i<3); return 0; } output-CODECHEF...CODECHEF...

View Article


Happy Birth Day Code Chef !!!!!

A very heart full congratulations to all the Code Chef organizers , participants on the 4rth Birth Day of Code Chef . I am a new user , registered i guess in September 2012 , and started participation...

View Article

How to increase ?

Hello everyone,Can anyone tell me that how can I increase my reputation so that I can vote for questions & comments .

View Article

How to prepare for GATE??

Hi friends, I am a B.Tech student. My ultimate passion is teaching.According to me teaching is most scared profession. I always love to share my knowledge, whatever I know. In order to become a...

View Article


Art Of Reading Code

Hello everyone,I often find it hard to read other's code than to write mine own version of code but competitive programming is not just all about writing codes. I have often heard people that you learn...

View Article

Why no Summer Internship Contests ?

@admin and users : Don't you guys think that there should be hiring contests or something like that on Codechef, kind of like what they had on Hacker Earth this month. I mean we do have excellent...

View Article

SPOJ RRANGE

I am trying to solve this problem RRANGE but cannot get an efficient approach with segment trees. I know I have to build the segment tree for the difference sequence but am unable to frame the complete...

View Article


Execution time

How do I get the execution time of a program in Windows?

View Article


factorial question

count=0 t=input() def z(x): answer=0 while(x>5): x=x/5 answer=answer+x return answer while(count<t): print z(input()) count+=1 .......... ......... ........ this is my code.....it gives me the...

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

Where are some editorials?

I don't understand why the editorials for some problems (probably harder) are missing? first exxample from april challenge - http://www.codechef.com/APRIL13/problems/STRQUERY - and for this month I'm...

View Article

Is there any better solution to find the shortest path

I have an array in which in each row , all the vertices are connected. eg: 0 3 4 6 2 0 1 2 5 here there is a direct path in between each of the two nodes in each row if we take row1: 0 is connected...

View Article


NZEC Error: Python

def main():n = int(raw_input()) initList = [] tempMax = 0 for i in range (0,n): initList.append(raw_input()) initList.sort() i = 0 for i in range (0,n-1): l0 = len(initList[i]) l1 = len(initList[i+1])...

View Article

python runtime NZEC error

I looked at all previous post here in the forum, but I still can't figure out why I'm getting this NZEC here. I'm trying to solve SALARY, http://www.codechef.com/problems/SALARY and here are my...

View Article


LUCKY10 Getting Worng Answer.

I got all the test cases mentioned in the question and cases given as counter cases in the forum also correct.And i tried many test cases of mine.And seems like correct to me.but still getting wrong...

View Article

Implementation of Heavy-Light Decomposition

People who can please write Implementation of Heavy-Light Decomposition(with comments if you can). Couldn't find any good implementation.Thanks!!!

View Article


BESTBATS:Getting wrong ans

sumone can please tell what is the mistake in following code...i am getting wrong answer http://www.codechef.com/viewsolution/2187870

View Article

help in c language

howbcan i print A^2 means exp in c language

View Article

Sorting in alogorithm::sort

which sorting method is used in algorith::sort?? pleasse explain cause i am getting tle in quicksort and ac with this inbuilt sort.

View Article
Browsing all 40121 articles
Browse latest View live


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