please help me still not getting where i'm wrong??
#include<stdio.h> #include<string.h> int main() { int t=0,i=0,j=0,max=0,count=0,sum=0,l=0,k=0; int m[200],c[10000]; char s[10000]; scanf("%d",&t); for(i=0;i<t;i++) {...
View ArticleYandex.Algorithm 2013 in Saint Petersburg, Russia, $18000 in prizes
In 2013 Yandex will host an open programming championship on the new Yandex.Contest system, with original rules, prizes, monetary awards and an exciting final round in St. Petersburg, Russia. But the...
View ArticleMaximum subarray probelm
1.I am studying "Introduction to Algorithm" by t.cormen and using Divide and Conquer technique I am solving this.2.My Code is not giving correct output for this problem.3.I am having problem to...
View ArticleEditorials On Codechef
@admin Can any user write editorial for the problems used in long and short contest or only authorised users have rights to do that.... ??
View Articleatm..wrong answer..cannot find the reason..
Below is the code that i wrote but it always shows"wrong answer" when i submit it.Can some please tell me what is wrong in it? thanx in advance...#include <iostream> #include <iomanip>...
View ArticleLittle elephant and candies wrong answer...please help..
Can someone please tell me what is wrong with this code? Thanks in advance..#include <iostream> using namespace std; int main() { int t,n,c,a,sum; cin>>t; while(t>0) {...
View ArticleLogic behind Simple Equation Problem
What is the logic behind in solving Simple Equation Problem.I checked some of the solutions and most of them usesct=f(n)-f(n-a-1)-f(n-b-1)-f(n-c-1)+f(n-a-b-2)+f(n-b-c-2)+f(n-a-c-2)-f(n-a-b-c-3); where...
View ArticleRanking in DELISH
I am just curious to know that how a solution becomes faster than others. Even if we apply the same algorithm and even use I/O optimization. I solved DELISH but never saw my rank. After some days I got...
View ArticleProblem with Sums in a triangle - C solution
I have solved the problem Sums in a triangle in C. MY APPROACH: I am using an array of 2 arrays named "row". I am using one of them for reading in the current row and the other for previous row. Then I...
View ArticleWhat is wrong with the code?
def numbers(): array=[] while True: number=int(raw_input('enter a number:')) if number!=42: array.append(number) else: break for i in array: print i if __name__=='__main__': numbers() And the question...
View ArticleBuy 1-Get 1 Wrong answer...!!!
http://www.codechef.com/problems/BUY1GET1 Above is the probelm of codechef, i tried to solve. I wrote the following code running perfectly fine on my laptop. Tried hard, but can't find any eroor for...
View ArticleTETRA : Wrong Answer
please help.......i'm getting wrong answer. i don't know wats wrong with the code . Here is the link to my solution Click here
View ArticleApproach to become Good Programmer.
I really want to know that whats the ideal approach for becoming a good programmer? Whats the secret to solve the Codechef questions? Any External links, online tutorials, e-books are welcome. ANY help...
View ArticleFinding lowest common ancestor in Binary Tree
This is not like other Codechef questions but still very interesting. How do we find lowest common ancestor in Binary Tree in O(n) time provided that you do not have any extra memory to store parent...
View ArticleRuntime Error(NZEC)
Why am I getting this error for my code on the problem The Next Palindrome (http://www.codechef.com/problems/PALIN)import java.io.*; public class Main { public static void main(String[] args)throws...
View ArticleBirthday Candles..wrong answer..please help
Can someone please tell me what is wrong with this code? It works fine for all the test cases in the example shown..Thanks in advance#include <iostream> #include <cmath> using namespace...
View ArticleNZEC Runtime Error
inpt = raw_input() withdraw, initial = [float(i) for i in inpt.split(' ')] if float(withdraw) > 0 and float(initial) >=0: if float(initial) - float(withdraw)>0 and float(withdraw)%5==0: final...
View ArticleLapindrome WA
can someone plz tell me why my Lapindrome code gives a wrong answer..it is workng fine for the test cases mentioned in example#include<stdio.h> #include<string.h> int lapindrome(char[]);...
View ArticleTurbo Sort
i am getting wrong answer but it runs fine in my netbeans compiler ...import java.util.Scanner; class tsort { private int[] numbers; private int number; public void sort(int[] values) { // Check for...
View Article