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

BEX - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESStack Data StructurePROBLEMHarry has a lot of books messed on the floor. He keeps a pile of books. At any time, he can put a book that has some...

View Article


Cooling Pies : COOLING

Code : http://ideone.com/FtzkyMWhat is the error in my code?After taking the input, the nested for loops are used to compare all the elements of array b (where I have stored the weights of the pies),...

View Article


How to improve and how to train: My personal experience and humble request

Hello @all,Following the series of tutorials I have been writing, I decided I would do something different this time, but equally important! I'm talking about analyzing the "lower-bound" of programming...

View Article

How to insert a struct into a set in C++?

how to insert a struct into a set based on first element of the struct?

View Article

MONTRANS - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONYou just simply need to perform this procedure no more than 10000 times and at each step update the maximal profit and optimal number of times to...

View Article


TLG:Even after spending half an hour on the statement and then sorting my...

my code is as:#include <iostream> #include "stdio.h" using namespace std ; int main() { int test,x,y,z,w,lead,max=0; cin>>test; if (test>10000) return 0; while(test--) { int sc1=0 ,sc2=0...

View Article

Plz help me remove TLE...Simple Java Program...Plz..

Problem :: http://www.codechef.com/problems/DIVISORS/My solution :: http://www.codechef.com/viewsolution/2571262

View Article

data stuctures specific questions..!!

hey everyone .. !! i m new to relatively new to coding and wondering how do i find problems specific to a topic like trees or graphs..!! write now i have done quite a few problems in the easy practice...

View Article


WA CNTSOLS

can any one tell me whats wrong with this solution

View Article


WA in spoj WILLITST (WILL IT EVER STOP)

Can anyone please tell me what is causing this WA. the problem is: http://www.spoj.com/problems/WILLITST/ here is my solution. http://ideone.com/qHy4Tdthank you

View Article

CHMOD - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESSimple Math, Repeated SquaringPROBLEMYou are given a list of N integers.Each value in the list is between 1 and 100.You have to respond to T...

View Article

TLE Dynamic Programming Problem lightoj

The time limit is 0.05 s But mine is 0.992 s .How can I optimize this code to get less than 0.5 s. LightOj id 1006#include<stdio.h> int dp[10000]; long long unsigned int a, b, c, d, e, f; int fn(...

View Article

GENARSEQ - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYEASYEXPLANATIONFinding x[k] at each step directly by definition is very slow. Let's do the following. After we find some x[k] let's mark all numbers greater than...

View Article


No response from codechef team

@Admins, I have been constantly sending emails to codechef, about the decrease in rating after JULY13, I also don't see my name in the rank list here even though I have my name in the winners blog post...

View Article

SORTING - Editorial

Problem Link:PracticeContestDifficulty:Easy-MediumPre-requisites:Persistent Data Structures, Segment Tree, Merge Sort TreeProblem:Find the number of comparisons that will be made during the sorting of...

View Article


Hackerrank Hack 101 Aug 2013 Contest .

Hello everybody , Yesterday night i participated in hacker rank contest and i solved one problem , VROOK My approach was something like this . Find a diff[n] ;where diff[i] = abs(p1[i]-p2[i]);Count the...

View Article

HELLO: Wrong answer

I am getting a wrong answer for HELLO. The logic I used was that instead of calculating for one month, I calculated it for 36 months(as that was the max validity option)and then compare the prices. The...

View Article


help needed spoj..

i have been trying to solve this question since the last 2 days but am not able to get a good algo for this problem.can someone help me out in this one.?.http://www.spoj.com/problems/C1LJUTNJ/

View Article

Plz..Plz...Plz...help me get rid of TLE...I am a new programmer(JAVA)..

Question Link :: http://www.codechef.com/problems/DIVISORSMy Solution Link :: http://www.codechef.com/viewsolution/2571296Regards,Akash (INDIA)

View Article

EOF character in Windows

I was trying to use the fread() function to take a chunk of input. fread looks for EOF character to detect the end of input so when I was trying to manually provide input at the terminal I was not able...

View Article
Browsing all 40121 articles
Browse latest View live