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

Prizes for lunchtime

Hi, I'm new to CodeChef. I would like to know what are the prizes for Lunchtime contestsThanks in advance.

View Article


Mouse Programming in gcc

I need some references for the mouse programming in gcc(since graphics.h doesn't work in gcc). Please help.

View Article


MSTICK - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYSIMPLEPREREQUISITESRange Minimum Query, Simple MathPROBLEMYou are given N matchsticks arranged in a straight line, with their rearends touching each other. You are...

View Article

Yet another number game question-getting "time limit exceeded"

I submitted the following solution for the problem-Yet another number game.#include <iostream> int main() { using namespace std; int test; int num; int k; cin >> test; int *p = new...

View Article

Image may be NSFW.
Clik here to view.

METEORAK - Editorial

PROBLEM LINK:PracticeContestAuthor:Roman RubanenkoTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dynamic ProgrammingPROBLEM:Given a N * M matrix mat with some obstacles inside,...

View Article


what is compilation error in this case?

#include<iostream> #include<math.h> #include<string.h> using namespace std; int main() { int cases,hints,no; char oper; string ans=""; int noo,i=0,j=0; cin>>cases; int...

View Article

What's wrong with my code????Why WA?????

The problem name is The Lead Game[easy section TLG].I've tried all possible test cases, read all comments, even seen some solutions(I shouldn't have done that) and now come to the last resort.HELP...

View Article

PRPALIN wrong solution got accepted

Look at these solutions. link1link2link3All these gives an answer 1 for input 1 which should never happen(because 1 is not a prime number). But they are given AC. This is due to weak test cases.@admin...

View Article


wrong answer chefluck

http://www.codechef.com/viewsolution/3283094 pls help thanks in advance

View Article


Exceeding time limit in Python

This is my solution for the enormous input test problem, and it is exceeding time limit. n, k = [int(_) for _ in raw_input().split(" ")] a = 0 for i in xrange(n): if int(raw_input())%k==0: a+=1 print a...

View Article

What's wrong with my code?

The problem name is The Lead Game[easy section TLG].I've tried all possible test cases, read all comments, even seen some solutions(I shouldn't have done that) and now come to the last resort.HELP...

View Article

TSORT- TLE.. i tried merge sort and sorting in algorithm header

I tried merge sort. and stable_sort() bt both gives TLE. plz help.links to my submission is given.

View Article

Factorial- FCTL. my code gives TLE. bt it runs fine on ideone for the given...

I checked the code in my computer also for different inputs. enter code here #include<stdio.h> #include<iostream> #include<math.h> #include<map> using namespace std; int main()...

View Article


The Lead game: Wrong Answer

I dont know what is wrong in the code.. Tried for many inputs. Runs fine on ideone. #include <iostream> #include<cmath> using namespace std; int main() { int t; int x1,y1,min=0,max=0,a;...

View Article

Recipe: WA. WORKS FINE FOR INPUTS IN TEST CASE.

#include <iostream> using namespace std; int main() { int t,n,min; scanf("%d",&t); while(t--) { scanf("%d",&n); int a[n]; scanf("%d",&a[0]); min=a[0]; for(int i=1;i<n;i++) {...

View Article


CANDLE: Whats wrong in my code??

#include <iostream> using namespace std; int main() { int t,min,min_pos; scanf("%d",&t); while(t--) { int a[10]; for(int i=0;i<10;i++) { scanf("%d",&a[i]); } int k=1; while(1) {...

View Article

what's the problem?

I want to ask that when i create a program it runs properly on my platform..but here on code chef it shows wrong answer.I have checked my program a no of times, i m not able to determine what is the...

View Article


runtime error

Problem:hereLong story short: The problem is about taking inputs from the inputstream and converting from little endian to big endian and vice versa. Here is my code: class Little_endians { public...

View Article

prims coalscam

hey how to solve COALSCAM by prims & also which is better to use prims/kruskal in a comman problem??

View Article

Code jam problem

Welcome to code jam problem: https://code.google.com/codejam/contest/90101/dashboard#s=p2I have been trying to solve this but have been unable to do so. I think my logic is correct and the dp is right...

View Article
Browsing all 40121 articles
Browse latest View live


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