C# : Use in codechef ?
Can C#(C sharp) will be use in doing programming ques and challenges,,?? and if yes which compilers?? pls reply.
View ArticleSPOONS - Editorial
Problem Link:PracticeContestDifficulty:easy-mediumPre-requisites:Sperner's TheoremProblem:Given an integer N, find the size of smallest set S such that there exists an antichain of size N among the...
View ArticleWhat are the "must known" algorithms for online programming contests?
Hello all, I've been practicing at Codechef for a while and now I'm gradually moving toward medium/hard problems. However many algorithms at these levels are very difficult to predict, and I was always...
View ArticleCAOS2 - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:NoneProblem:Given a matrix whose each entry is either '^' or '#', find the sum of weights of all CPCs. A cell is CPC if it is filled with...
View ArticleLogic for " Ambiguous Permutations "
For the problem Ambiguous Permutations I read in one of the posted solutions the following piece of code which executes very fast :boolean check=true; int loc=0; for(int i=0;i<array.length;i++){...
View ArticleChanges from October Contest .
Hey , @admins : Sorry ! But I could not resist the temptation to share this with fellow code cheffers . Being on the list of chefs for the "LUNCH TIME" contest that Code Chef organises , I have come to...
View Articleproblem ATM Wrong answer
#include<iostream> #include<stdio.h> using namespace std; int main() { int amt; float bal; cin>>amt>>bal; if(amt%5==0&&amt<bal) { bal=bal-amt-0.50; }...
View ArticleWA in C, accepted in C++, same code
Riddle: The following code results in WA when compiled as C and gets "Accepted" when compiled as C++: http://www.codechef.com/viewsolution/2684428 Why is that? #include <stdio.h> #include...
View ArticleINTEG - Editorial
Problem Link:PracticeContestDifficulty:SimplePre-requisites:NoneProblem:Given a list of N integers A[1], A[2], ... A[N], and an integer X, find the minimum cost of making all elements non-negative....
View ArticleError in code for generating prime numbers upto 10^5
Code : clickSince there are 9592 prime numbers between 1 to n , I have declared an array a having 9592 elements. We know that 2 and 3 are primes so I have stored them in the array directly. Starting...
View ArticleWA for TSORT
I am trying to solve TSORT by making use of inbuilt function qsort in C. this is my solution. The solution gives the right answer even with the number to be sorted as large as 10^7 on my machine. What...
View ArticleHelp the Integer
Hi, I am getting wrong answer in the follwing question:-http://www.codechef.com/SEPT13/problems/INTEGI am not getting which test case I am missing ,Kindly help me #include<iostream>...
View ArticleSome thoughts about SEP13 and my frustration
Hello @all,Now that SEP13 has come to an end, I guess I would like to share some thoughts about it and comment a bit about what I felt of the contest and also about some of the pre-requisites some...
View ArticleWA in DELISH
I am trying DELISH problem. This is my solution. I had already spent 3 days in understanding the editorial and then coded on my own, but it is always WA. I am unable to understand what is wrong with my...
View ArticleTWOROADS - Editorial
Problem Link:PracticeContestDifficulty:HardPre-requisites:High School GeometryProblem:Given a set S of N points in plane, you have to draw two lines such that sum of squares of distance of each point...
View Articleproblem in chef and integer problem
#include<iostream> using namespace std; int counting(long int[],unsigned long int); int main() { unsigned long int n; cin>>n; long int* a=new long int[n]; for(int i=0;i<n;i++)...
View ArticleMLCHEF - Editorial
Problem Link:PracticeContestDifficulty:MediumPre-requisites:Segment Trees, BITProblem:Given a rooted tree, each of whose node is associated with an integer, "health". You have to perform two...
View ArticleNZEC error
Can anyone please tell me why I am getting an NZEC error in this program?? I cant find it! http://www.codechef.com/viewsolution/2686919 ...please!!
View ArticleLittle Elephant and Divisors - LEDIV
Problem link : LEDIVMy code : LEDIVCan't figure out the error in my code. Please help.
View Article