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

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 Article


SPOONS - 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 Article


What 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 Article

CAOS2 - 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 Article

Logic 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 Article


Changes 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 Article

problem 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 Article

WA 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 Article


INTEG - 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 Article


Error 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 Article

WA 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 Article

Help 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 Article

Some 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 Article


WA 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 Article

Image may be NSFW.
Clik here to view.

TWOROADS - 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 Article


problem 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 Article

MLCHEF - 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 Article


NZEC 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 Article

Little Elephant and Divisors - LEDIV

Problem link : LEDIVMy code : LEDIVCan't figure out the error in my code. Please help.

View Article

Please explain the test cases for CARVANS

Problem link : CARVANS

View Article
Browsing all 39796 articles
Browse latest View live