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

Cheating in CodeSprint 5?

Is this cheating...

View Article


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 Article


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

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

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


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

GANGAAM - Editorial

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

View Article

Getting 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 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.

CAKE1AM - Editorial

PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:cakewalkPREREQUISITES:Basic Coordinate GeometryEXPLANATIONRestated in simple terms...

View Article

GAMEAAM - Editorial

PROBLEM LINKSContestPracticeAuthor: Abdullah Al MahmudTester: Gerald AgapovEditorialist: Praveen Reddy VakaDIFFICULTY:easyPREREQUISITES:Algorithmic Game Theory, Sprague Grundy TheoremEXPLANATIONWe need...

View Article

ORDERAAM - 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 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

QUICKSORT 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
Browsing all 39796 articles
Browse latest View live


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