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

Image may be NSFW.
Clik here to view.

CAKE2AM - Editorial

PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:medium-hardPREREQUISITES:Graph Theory, Maximum Independent Set in Bipartite Graphs,...

View Article


TOTR:WRONG ANSWER

THE CODE RUNS FINE FOR TEST CASES..#include <iostream> #include <cstdlib> #include<cctype> #include<cstring> using namespace std; int main () { int t; char m[26]; char...

View Article


Image may be NSFW.
Clik here to view.

GAMEAAM - Editorial

PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:easyPREREQUISITES:Algorithmic Game Theory, Sprague Grundy TheoremGo through these...

View Article

GANGAAM - Editorial

PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Vinod ReddyDIFFICULTY:easyPREREQUISITES:Greedy AlgorithmsEXPLANATIONWe will solve the problem using greedy...

View Article

WA in CAKE1AM

I am getting WA. Algorithm looks correct to me. Am I missing any corner cases?main() { ll tst; cin>>tst; while(--tst) { ll...

View Article


WRONG WAY-KARMA (PLEASE CHECK)

//after a recent post by kchahdog about unethical karma farming last month a similar case :(I noticed that this user was upvoted nearly 12 times in a matter of 5 mins by this user today(with same...

View Article

STACK SIZE FOR JAVA AND PYTHON

I think all java users are aware of the small stacksize provided defaultly.... recently i used python and it also same as java. So can something be done to equalize the stacksize of java with the...

View Article

Cook off Jan 2014 - Subtraction Game

the question for the solution below is - http://www.codechef.com/problems/GAMEAAMNow...The following code is working fine for the test cases but giving wrong answer on submission. What is the mistake...

View Article


GERALD04 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:ProgrammingPROBLEM:GF --- (t2 - t1) --- Chef --- dist --- HomeGiven...

View Article


getting WA for ERROR

questionmy solutionplease give me a test case where my code fails

View Article

whats wrong with this atm code ??

#include <stdio.h> #include <stdlib.h> int main() { float a[2]; scanf("%f%f",&a[0],&a[1]); int d=(int)a[0]; float val=a[1]-a[0]-0.5; if(d%5==0&&a[0]<a[1]+0.5) {...

View Article

WA for COINS

I've been trying to solve this simple dp problem but I'm getting WA. I can't find anything wrong with my code. Can anybody please help me out?Problem - http://www.codechef.com/problems/COINSmy...

View Article

COOLING:WA. CANT GET WHATS WRONG.

#include <iostream> #include <cstdlib> int compare (const void * a, const void * b) { return ( *(int*)a - *(int*)b ); } int main () { int num,i; int t; scanf("%d",&t); while(t--){...

View Article


ATM problem to slow?

int cash,balance; float saldo; scanf("%d",&cash); scanf("%d",&balance); if(cash%5!=0 || cash+0.5>balance){ printf("%d",balance); return 1; } else saldo=balance-cash-0.5;...

View Article

KNIGHTS - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONIf we construct a graph where each vertex corresponds to a square of the chessboard, and an edge connects two squares if they cannot both hold...

View Article


Image may be NSFW.
Clik here to view.

Introduction to Graphs: Definitions, Traversal, Depth-First Search

Hello @all,As I have mentioned on several posts here on forums, I am only now starting to learn graphs in a more educated, methodical and serious way, so, after I have studied DFS for few days and due...

View Article

multiple accounts

multiple accounts :(.

View Article


Python or C

Hi all, I am new to codechef and now i am getting deeply interested in solving codechef problems. The question that flutters my mind is that should i prefer python or C for solving. I want to know all...

View Article

FRBSUM - Editorial

PROBLEM LINK:PracticeContestAuthor:Constantine SokolTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Segment Tree, Binary Search, Persistent Segment Tree.PROBLEM:Given A[1..N], and...

View Article

explaination of Forbidden Sum?

can someone explain this part of the editorial of Forbidden Sum of January Long (http://discuss.codechef.com/questions/35346/frbsum-editorial) "For the static Segment Tree, we can maintain a sorted...

View Article
Browsing all 40121 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>