ATM : C++ result showing wrong result
I have written following code for ATM problem. I dont understand why codechef is showing result as wrong answer? #include <iostream> #include <iomanip> using namespace std; int main() { int...
View ArticleHELPLIRA - WA
guys sorry for bothering you, but i am tired of submitting my jerky code again and again: http://www.codechef.com/viewsolution/3268387. i used area=height*base/2 approach, rather than what was taught...
View ArticleGetting WA in ATM, can someone help?
#include <stdio.h> #include <stdlib.h> int main() { int x; float y,z; scanf("%d %f",&x,&y); if((x<=2000) && (y<=2000)) { if(x>y) { printf("%.2f",y); return 0; }...
View ArticleSubtraction Game Problem (Jan Cook-off)
What concept of game theory is used to solve this problem? I found total steps taken for each pair of numbers to become equal and then checked whether it was odd or even, however this method TLE'd.
View ArticleCAKE2AM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:medium-hardPREREQUISITES:Graph Theory, Maximum Independent Set in Bipartite Graphs,...
View ArticleGANGAAM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Vinod ReddyDIFFICULTY:easyPREREQUISITES:Greedy AlgorithmsEXPLANATIONWe will solve the problem using greedy...
View ArticleGetting SIGSEGV in Dessert Wizard
I am getting SIGSEGV error in all my submissions for the problem: Dessert WizardCould someone kindly direct me to my mistake.My latest submission is:http://www.codechef.com/viewsolution/3276277Thanks...
View ArticleTOTR: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 ArticleCAKE1AM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:cakewalkPREREQUISITES:Basic Coordinate GeometryEXPLANATIONRestated in simple terms...
View ArticleGAMEAAM - Editorial
PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:easyPREREQUISITES:Algorithmic Game Theory, Sprague Grundy TheoremEXPLANATIONWe need...
View ArticleORDERAAM - Editorial
PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Abdullah Al MahmudEditorialist:Vinod ReddyDIFFICULTY:HARD. PREREQUISITES:Flow,GreedyPROBLEM:We are given orders of the form (Si,Di,Xi,Pi) where Si...
View ArticleWA 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 ArticleWRONG 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 ArticleSTACK 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 ArticleCook 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 ArticleGERALD04 - Editorial
PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:CakewalkPREREQUISITES:ProgrammingPROBLEM:GF --- (t2 - t1) --- Chef --- dist --- HomeGiven...
View Articlewhats 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 ArticleQUICKSORT not working as required.
#include<stdio.h> #include<stdlib.h> int partition(int *a,int p, int q) { int key=a[q],t,i,j=q-1; i=p; while(i<j){ while(a[i]<key&&i<q) i++;...
View Article