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

input in python

How can we input data in python like that of ideone. like i have input stored in file and i want to give whole input at once through stdin.

View Article


MARCHA1 i'm getting wrong answer ?

question link please provide a test case for which my code is failing.my solution:

View Article


ATM showing wrong answer in C++

#include<iostream> #include<iomanip> using namespace std; int main() { int X; double Y; cout<<X<<" "<<fixed<<setprecision(2)<<Y<<endl; if(0<X<=2000...

View Article

GERALD05 - Editorial

PROBLEM LINK:PracticeContestAuthor:Gerald AgapovTester:Tasnim Imran SunnyEditorialist:Jingbo ShangDIFFICULTY:MediumPREREQUISITES:Dynamic Programming, CombinatoricsPROBLEM:Given a lot of objects,...

View Article

TLE in PRETNUM

can someone suggest optimizations to avoid TLE...http://www.codechef.com/problems/PRETNUMI am finding all primes using sieve then finding number of divisors of each number and then checking whether it...

View Article


Unable to submit solution for MONEY Matter Problem..!!

I tried to submit the solution for Money Matters problem . I'm getting this message from online judge . "Solutions to this problem cannot currently be submitted in this contest." Admin please help me...

View Article

College wise Codechef ratings- please see this site

Guys please check out this awesome site. You can add your code chef username and it will display rankings of users from your college. Please add your college if it is not present and then add usernames...

View Article

sigsegv error.

// program for codechef UNCLE JOHNY #include <stdio.h> int main() { int t,pos,i,ujp,j; unsigned long int n; int arr[n]; int high=n,low=0,mid; scanf("%d",&t); while (t) { scanf (...

View Article


Approach to become Good Programmer.

I really want to know that whats the ideal approach for becoming a good programmer? Whats the secret to solve the Codechef questions? Any External links, online tutorials, e-books are welcome. ANY help...

View Article


Problem code: FCTRL Factorial

why is it showing wrong answer?include<iostream>using namespace std; int main() { int count,div,i,t; long long int n; cin>>t; while(t>0) {div=5; count=0; cin>>n;...

View Article

sorting of structure

struct contestant {int prob,time; bool operator < (const struct contestant &c ) const { if( this->prob > c.prob ) return 1; else if( this->prob == c.prob) { if( this->time <=...

View Article

Image may be NSFW.
Clik here to view.

QTREE6 - Editorial

PROBLEM LINK:PracticeContestAuthor:Minako KojimaTester:Gerald AgapovEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Link Cut Tree, Heavy-Light DecompositionPROBLEM:Given a 0/1 colored tree of N...

View Article

Image may be NSFW.
Clik here to view.

REALSET - Editorial

PROBLEM LINK:PracticeContestAuthor:Iaroslav TverdokhlibTester:MahbubEditorialist:Jingbo ShangDIFFICULTY:HardPREREQUISITES:Circulant MatrixPROBLEM:Given a Circulant Matrix, determine whether it is full...

View Article


Memory foot-print of code

The problem in question is DECSTR. My solution gives a memory usage of 2.2M. In order to find out how to reduce the mem usage to 1.6M, I looked into some other top solutions but found them almost...

View Article

ACM ICPC onsite problems

@admin im wandering if the the replay of the ACM ICPC onsite regionals of kharagpur and amritapuri will be conducted on codechef as the problems are became public.if no replay will be conducted at...

View Article


IDE for C++

What are the most used IDE for C++ ? Which is suitable for Windows ?

View Article

Red black tree implementation in c++

Hi guys,Could any one point me to a good,simple implementation of red-black trees in c++ , which i can use in competitive coding as a general balanced binary tree. I am not particularly looking for...

View Article


SOCIAL - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONThe chef chooses a random derangement of the chairs as the follow-ups. If we focus our attention on a single guest, that guest will be back in...

View Article

Image may be NSFW.
Clik here to view.

J7 - The Best Box guidance

http://www.codechef.com/problems/J7 codechef J7 - "the best box" guidance: - to get optimal maximum size: (special thanks to falcon - Sahin Mammadov) suppose we have 2 functions "a" & "b". function...

View Article

WA in SPOJ-BOTTOM

In the question http://www.spoj.com/problems/BOTTOM/ i am regularly getting a wrong answer. I am trying to modify Targans Algorithm for Connected Components. This is my code http://ideone.com/Qe6BmJ My...

View Article
Browsing all 39796 articles
Browse latest View live


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