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

Life, the Universe, and Everything , whats wrong with this c++ code

Hi im new to codechef and just wanted to know why this solution is not being accepted even though it gives me the correct output on codeblocks. I read the faqs and even those didnt help. Please see,...

View Article


COOLING PIES - WA

#include <stdio.h> int main() { int t, piesOccupied; scanf("%d", &t); while (t--) { int n, i, j; scanf("%d", &n); piesOccupied = 0; int piesWeight[100]; piesWeight[0] = 0; int...

View Article


NZEC in Python code for DIGJUMPS.

Hello, I have this Python solution for Chef and Digit Jumps which is giving me an NZEC error. I believe the algorithm is correct and BFS-like, but I am new to debugging NZECs in Python. Can anyone...

View Article

getting the in.txt and out.txt

Admin , can i please get the in.txt and out.txt for BESTBATS. My answer is working correctly for the testcases I have given(verified),but codechef's judge is reporting wrong answer.

View Article

Why is this approach giving while the other one is not ?

Have a look at this code. Then at this code.Can somebody please help me figure out why is my approach giving TLE and the other one is not? This problem disturbed me a lot during the contest.

View Article


TLE IN FUNC

PLZZ SUGGEST ANY WAYS TO REMOVE TLE IN FUNC...SOLN LINK... :-- http://www.codechef.com/viewsolution/4109517THNX IN ADVANCE

View Article

LONG CHALLENGE JUNE14 ratings not updated?

It is more than 24 hours and ratings for the JUNE14 is not yet updated.

View Article

Struggling with DP

I am a beginner in dynamic programming,I am not getting how to approach problems based on it.What is the best source or reference of DP for a beginner? thanks

View Article


GRAYSC - Editorial

PROBLEM LINK:PracticeContestDIFFICULTY:Easy-MediumPREREQUISITES:Pigeonhole Principle, SetsPROBLEM:You're given N 64 bit integers such that any two successive numbers differ at exactly 1 bit. Your job...

View Article


ATM problem

include<stdio.h>main() { int wit; float bal; scanf("%d%f",&wit,&bal); if((wit>0)&&(bal>=0)&&(wit<=2000)&&(bal<=2000)) {...

View Article

Dynamic Programming prerequisites?

What all things I have to learn first before starting dynamic programming. I know data structures, but I don't know applying divide and conquer,greedy etc.. Please help. Can I start DP directly?

View Article

Cheating in June Long Contest 2013

Just want to bring it to the admin's notice. Problem - http://www.codechef.com/JUNE13/problems/SPMATRIX Following set of solutions by different users are same:...

View Article

#define directive use ?

What exactly are the benefits of using #define directives like this :include<stdio.h>define QUICK(x) printf("%s\n",x);define ADD(x, y) printf("%d\n",x+y);int main() { QUICK("Hello!") ADD(5,6)...

View Article


Chef and Functions JUNE 2014 CHALLENGE ??

I USED SIMPLE APPROACH TO SOLVE THIS AND GET TIME LIMIT EXCEED. PLEASE EXPLAIN ME SOLUTION OF THIS PROBLEM AND APPROACH TO SOLVE THIS PROBLEM,WHICH TYPE OF ALGORITHM SHOULD BE USED TO SOLVE THESE...

View Article

Graph theory

How can we check whether a directed graph has spanning tree or not

View Article


nltk( natural language processing)

I want to design a search engine in python using nltk( language processing)[designing a website in web2py.. i need to add advanced search engine in it]. Do i have to study complete ntlk book :( .. does...

View Article

Why is this approach giving WA while the other one is not ?

Have a look at this code. Then at this code.Can somebody please help me figure out why is my approach giving WA and the other one is not? This problem disturbed me a lot during the contest.

View Article


Why is C program taking more memory than usual in codechef?

Just used two integer variables in my program and codechef says Mem 2.2MID Date/Time User Result Time Mem Lang Solution4112817 41 min ago pravinkumarr 0.09 2.2M C ViewMy program...

View Article

ATM problem showing runtime error

#include <stdio.h> int main() { int wi; float ab; scanf("%4d%4.2f", &wi, &ab); if(ab>wi&&(wi%5==0)) printf("%4.2f", (ab-wi-0.5)); else printf("%4.2f", ab); } i don't know why...

View Article

new to recursion, getting StackOverflow. Help!

I am writing a divide and conquer recursive function to find minimum element in array. But I am getting java.lang.StackOverflowError . Here is my code. Thanks in advance.import java.util.Scanner;...

View Article
Browsing all 39796 articles
Browse latest View live


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