BNGAME - Editorial
Problem link : contestpracticeDifficulty : EasyPre-requisites : Two pointersProblem : Calculate the minimum possible penalty for the game described.Explanation :The heart of the solution is the...
View ArticleSearching a large file in UNIX using a program.
How can I search a large file for a pattern, the result should be a pointer to the line containing the pattern. I have to do this in a program that is also writing to that file. The file will be in on...
View ArticlePATH BETWEEN TWO VERTCES IN A GRAPH
if two vertices of the graph has a path ..then how to print the path between them(any possible path)?
View ArticleSPEED problem
I am not getting the solution of this problem SPEED (ie ans= (a-b)/gcd(a,b)) .Can anyone explain it! Thanks in advance!
View Articlecore java: stupid doubt
what's wrong with this class:class reverse { public static void main(String[] ar) { Console c=System.console(); System.out.print("Enter the first number:"); String n=c.readLine();...
View ArticlePython returning NZEC in ATM
ankitchannedef atm(w): fund=30000.00 w=input() total=w+w*0.50/100 if w%5==0 and fund-total>=0: print fund-total else: sys.exit() atm(0)this is my code.But I am getting NZEC. help-the-noob
View ArticleThe Next Palindrome Wrong Answer
I am submitting this code after thinking about all possible test cases but it is giving me wa. Any suggestions would be of great help. The link is link text
View ArticleFind the first Largest and first Smallest line in a text file.File must be...
Program to find the first largest and first smallest line in a text file.File must be taken as command line argument
View ArticleMAXPR - Editorial
PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:Shiplu HawladerEditorialist:Praveen DhinwaDIFFICULTY:EasyPREREQUISITES:dynamic programming, simple combinatorics.PROBLEM:Given an array A. You have...
View Articlegetting time limit exceeded....new to code chef
I am new to code chef n i m getting time limit exceeded warning i need help on my code for the problem http://www.codechef.com/problems/DEFACING-->link text / Author:Harry The Hadrian Kione...
View ArticleWhat is the error in my code for Farmer Feb(under Practice(easy))?
include<stdio.h>include<stdlib.h>int main() { int x,y,t,a,b,ans,flag,i,j; scanf("%d",&t); while(t) { scanf("%d %d",&x,&y); a=x+y; if(a==2) { printf("1\n"); goto xy; } else...
View ArticleGraph Theory Tutorials
Hello coders as i feel little uncomfort on graph theory problems So can u guys guide me . I prefer JAVA.Please help me in these topic in Java if possible :-1)How to represent graph in java in adjacency...
View ArticleC++ FCTRL2 Wrong Answer ?
#include <iostream> using namespace std; int main() { int t; int n; int x; cin >> t; while(t) { cin >> n; x = 1; for(int i = 2; i <= n; i++) { x *= i; } cout << x <<...
View Articlewa in The White Knight codechef easy
http://www.codechef.com/problems/E1/my solution: http://ideone.com/jHk7eg can somebody plz tell why it is giving wa again and again...???
View ArticleCANDLE - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONThe answer will always be either a repdigit (a number composed of repeated instances of the same digit) or a power of 10. We find the smallest power...
View ArticleSPOJ QTREE4
Could someone help me understand and solve SPOJ QTREE4.I've solved QTREE1-3 using HLD and Segment trees but the same approach doesn't seem to work in this one. Since, we need to find the longest...
View ArticleNorth Korean participants competing in teams?
You may all be aware that North Korean competitors are very successful in Codechef contests, particularly in the monthly Long Contests. Both @kgcstar and @kutengine won the monthly long contests...
View ArticleCollege wise ranking on contest page
Hello friends, As everyone might be knowing already about Codechef college wise ranking website present on www.okrdx.com. Here is it's Chrome plugin, now you can just see ranks without going anywhere...
View ArticleGetting a run time error. Help.
Can anyone help me with the code given below. The code is for the problem 'small factorials'(FCTRL2) and the error which i am getting is runtime error. So please help.!!The link to my code is :...
View ArticleSEAGRP - Editorial
PROBLEM LINK:PracticeContestAuthor:Sergey NaginTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Matching, Gaussian EliminationPROBLEM:Determine whether there is any perfect...
View Article