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

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


SPECOPS CODEX

http://www.codechef.com/CODX2014/problems/REN2013J can somebody explain how to apply lazy propagation for this problem

View Article


obstacle course

how to solve when the cones are in the same straight line.. unable to figure it out..:( even by applying MST (kruskal/prims)

View Article

Parser to fetch contest testcases for C++

Is there a plugin for any C++ IDE to fetch testcases during online contests(codechef,codeforces or any other for that matter) like one Egor has for Intellij(java)UPD 1:By testcases here I mean pretests...

View Article

wrong answer lucky lucky number

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

View Article

SUBSET SUM problem in CODEX 2014

Problem link : http://www.codechef.com/CODX2014/problems/REN2013DPlease help me how to solve this problem and how this problem is different from standard subset sum problem(NP PROBLEM).The only way i...

View Article


CODE-X Prize distribution

All the winners will be contacted by Tuesday, Top 3 will be getting prizes and Top 20 will be given certificates. Only Indian Contestants are being considered for prizes, but certificates are for...

View Article

Difference between getchar() & getchar_unlocked()

getchar_unlocked() is usually used to get faster input.But I have not understood the difference between the getchar_unlocked() and getchar(). Also, why is getchar_unlocked() faster and what does the...

View Article


about algoritms

**how we learn algorithms and from where we start to read algorithms?i am not able to solve even easy problemsplz!!!!!!! suggest me**

View Article

KGP13F - Editorial

PROBLEM LINK:PracticeContestEditorialist:Jingbo ShangDIFFICULTY:EasyPREREQUISITES:Pick's TheoremPROBLEM:Give a 4-point polygon (integer coordinates), find out how many integer points inside or on the...

View Article


How to study :)

Hello @all,As we are here to study algorithms and, as a great way of doing it is by reading books/editorials, knowing how to read them in "the correct way" can sometimes be the difference between...

View Article

Getting TLE in PT07Z spoj(Longest path in a tree) in java. Please help

problem link: http://www.spoj.com/problems/PT07Z/I have used both double BFS and double DFS for this but getting TLE for both approaches while these two approaches worked for C/C++ users. What can I do...

View Article

【When will Rank of CodeX 2014 be shown?】

Hav bein waitin 4 nearly 3 hours now. When ll it show up?

View Article
Browsing all 39796 articles
Browse latest View live


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