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

Defining a variable inside for loop

I want to make some basics clear :)Now In insertion sort we use 2 for loops and inside the for loop we keep track of key element which is to be insertedCODE for(int i = 0 ; i < n ; i++) ` `int key =...

View Article


Open source vs Algorithms - which is better

If one has an aim of being a good and successful programmer, what should one prefer -- contributing to open source projects or developing algorithmic skills by solving codechef , topcoder problems, and...

View Article


Codeforces Round #187 (Div. 1, 2).

Codeforces round #187 for both div. is going to be held on 06/07/2013 at 19:30 MSK (21:00 IST). Registration will start in 21:00:00 hrs. Check your time zone here.

View Article

Feast for Python lovers

Hey Friends!!! and my fellow Python lovers this is to inform you that Python Indian Community is re-hosting the well awaited Indian version of Python Conference (PyCon 2013) on August 30, 31 &...

View Article

CHEFGIFT - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONYou can view the editorial for this problem here.SETTER'S SOLUTIONCan be found here.TESTER'S SOLUTIONCan be found here.

View Article


Previous Contests

Is there a way by which one can submit solutions to earlier contest?

View Article

Resubmit button

When we submit a solution to a problem and it doesn't get accepted, we have to make the extra effort to go back to the problem and then click the submit button again.It would be good if codechef adds...

View Article

Problem Classifier for Codechef

Thanks to codechef community there are lots of different problems to solve in codechef practice section. But they are not classified based on algorithm used to solve the problem. If I were to solve...

View Article


ISM01- what's wrong with my submission?

"""Python programming""" def calc(p): q=0; while(p>0): q+=(p%10); p=int(p/10); print(q) m=1; n=list(); s=int(input("Enter the number of test cases:")); for i in range(s): n.append(int(input("Enter...

View Article


UNLUCKY NUMBERS

Hi everyone,I'm struggling with this problem, and I don't have any idea to do it yet. Does anyone know how to solve it?A positive integer is called a lucky number when the sum of some of its digits...

View Article

ISM01- what's wrong with my submission?

import sys def calc(t): q=0; while(t>0): q=q+int(t%10); t=t//10 print(q,file=sys.stdout) n=list(); s=int(input()); for i in range(s): n.append(int(input())); for p in n: m=1; for i in range(p+1):...

View Article

cutting recipes

t=int(input()) i=0 if(t<=100): for i in range(t): f=[] f= list(map(int, input().split())) l=f[0] if((l>=2)and(l<=50)): f.remove(f[0]) def gcd(x,y): rem=x%y while(rem!=0): x=y y=rem rem=x%y...

View Article

WA [CIELNUM2]

my solution: http://www.codechef.com/viewsolution/2195528is producing WA always... and i don't understand what this statement actually mean(given at the end of problem): "Different operating systems...

View Article


Some more homework

plzz smone help me out to optimize my solution its giving time limit exceeded: 8.32 secs http://www.codechef.com/viewsolution/2195392is my algo correct ? or am i making a serious mistake in there ?...

View Article

How can i submit solutions to previous contests?

Is there a way by which one can submit solutions to earlier contest?

View Article


Algorithm learing

What Algos we need to learn to solve most of the problems?? plz...state in the order of learning..:D

View Article

NZEC error

This is my code :-#!/usr/bin/python import sys, os, string,linecache def main(): file2=open("out.txt",'w') no= linecache.getline("in.txt",1) for i in range(2,int(no)+2): #print i...

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

TREE - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESKirchhoff's Matrix Tree Theorem, MathPROBLEMFind the number of Trees that contain k*n nodes, which are labeled from 0 to k*n-1, such thatThere is...

View Article

Please help

I m new to Codechef....but i m not able to get even one successful submition.....my code is working fine ,in IDE i m using..but here it shows some or the other error..... even for the question...

View Article
Browsing all 39796 articles
Browse latest View live