Shouldn't we use built-in modules in codechef?
In the multiple factorial problem(i guess I remembered it right!) I first submitted it by using factorial method available in the math module(math.factorial) but, it didn't go good. I tried second time...
View ArticleCOUPON - Editorial
Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYSimplePRE-REQUISITESSimple Math, Dynamic ProgrammingProblem:You are shopping to buy N...
View ArticleWhy is that I get answers when I run in my system but not in codechef?
Considering this example, I find no flaw here...def sorting(): holder=[] t=int(input()) for i in range(t): n=int(input()) holder.append(n) holder.sort() for i in holder: print i if __name__='__main__':...
View ArticleWhat's wrong with this code?
def div(n,k): count=0 for i in range(n): integer=int(input()) if integer%k==0: count+=1 print count
View Articleusaco gateway down?
is usaco gateway down for everyone. I've tried from three different connections and cleared the browser cache and cookies.ace.delos.com/usacogate
View ArticleTASTYD - Editorial
Author: Roman Rubanenko Tester: Vamsi Kavala Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYMediumPRE-REQUISITESDivide-and-conquerProblem:Chef is at a restaurant serving dishes....
View ArticleLEMOUSE - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:Dynamic ProgrammingProblem:Little Elephant is coordinates (0, 0) of a NxM grid A. A[i][j] = 0 if there is no mouse in cell (i, j), else it is...
View ArticleTLE in Last Digit Sum (LASTDIG)
I am getting TLE in my solution. What can i do to avoid getting a TLE while implementing he same logic that i have used. If that's not possible what are the changes that i have to make? here's my...
View ArticleNUMFACT - Editorial
Author: Vamsi Kavala Tester: Roman Rubanenko Editorialist: Bruno OliveiraPROBLEM LINKSPracticeContestDIFFICULTYCakewalkPRE-REQUISITESSimple Math, Integer FactorizationProblem:You are given a very large...
View ArticleCompile error in CVOTE problem
the following code is compiling and running fine in my system for the problem CVOTE. however, it fails to compile in codeshef. Can someone please explain why??import java.util.*;public class Main...
View ArticleLearn Programming
HI everyone...we all are programmers and everyone of us are on facebook so here is a group where we post problems and their solutions and also we can post some new information about programming and...
View ArticleDISCUSSION FOR LEMOUSE
Please elaborate the explanation on LEMOUSE JUNE CHALLENGE 2013.
View Articleplz help me to write a code in c++
find out the base and height of the triangle and find out perimeter and area of triangle in c++
View Articlei want help in programming coding in c++
i want rpogramming code for --> acceptive value from user and find out square of the no. in c++
View Articlewrong answer in matchstick problem
i am getting wrong answer for this question http://www.codechef.com/problems/MSTICK/ . please help in correcting my algorithm, i cant find any error http://www.codechef.com/viewsolution/2308249
View ArticleUnderstanding Trie and its applications
Hey folks. I was going through data structures and came across TRIE ( prefix tree ) (I don't know much about it except for the fact that it is used for fast searching of stings and used in auto...
View ArticleThe lead game..can some one point out the mistake.
Problem link - http://www.codechef.com/problems/TLGSolution- import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import...
View ArticleTutorials for C++ Object Oriented Programming
I need some suggestions on books or any good links to learn the OOP concepts of C++. I dont want to read big big books for this, rather I need something which is to the point, short and explicit.Pls...
View Articlereturn a value from the function
#include<stdio.h> long long a[1000000],i,ans,n; long long mon(long long n) { if(n<1000000) return a[n]; else return mon(n/2)+mon(n/3)+mon(n/4); } int main() {...
View Article