Quantcast
Browsing all 39796 articles
Browse latest View live

In Java solution of the following problem, getting NZEC on closing...

Hi,I have been solving the following question. http://www.codechef.com/problems/WALK the question is an easy one. My question is regarding this solution. http://ideone.com/zbSaAy if i keep br.close()...

View Article


getting wrong answer

include<stdio.h>int main() { int n,i,z; double k; scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%d",&z); for(k=1;z;z--) k=k*z; printf("%.f\n",k); } return 0; }

View Article


Why my code is giving wrong answer for Traveling Plan Problem

Can any body tell me why my code is giving wrong answer ?Algorithm :unsigned long max -> will contain the final max waiting time in optimal case unsigned long t -> T unsigned long m -> M...

View Article

ORDERS SPOJ

How to solve this problem http://www.spoj.com/problems/ORDERS/ I have seen some solution implementing tree to solve it but not able to understand it please help me out....

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


LEBALONS - Editorial

PROBLEM LINK:PracticeContestAuthor:VitaliyTester:Sergey KulikEditorialist:Lalit KunduDIFFICULTY:EASY-MEDIUM PREREQUISITES:Combinatorics, Dynamic Programming, Probability PROBLEM:Given N ballons, i'th...

View Article

getting wrong answer for TREE PRODUCT

i am getting worng answer for http://www.codechef.com/problems/TPRODUCT ...this s my solution http://www.codechef.com/viewsolution/3963593 ...pls help

View Article

File size limit exceeded !!!

Check out this link:http://www.codechef.com/status/COINS,mkrjn99 I don't know why am I getting file size too large when my source code is well under the source code limit.

View Article


Best known algos for calculating nCr % M

I have often encountered calculating nCr problems the last one being one of the IIIT-M problems but it probably had weak test cases that got easy solutions AC. The other one...

View Article


Change Language in Account

Hello Sir, I want to change language from C to C++ in my account. PLz help me how to change

View Article

SPAM : Is that right decision to get SEO services from smm india company?

Is that right decision to get SEO services from smm india company?

View Article

REPSTR - Editorial

PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONAt first, it is easy to prove that if there exists a substring with the length of K (K > 1) appearing the most times, there must exist another...

View Article

Better algorithm than O(nlogn)(or better implementation)

I have been trying to solve this SPOJ problem R2D2.I have been using segment tree.But I am getting TLE.Time limit is 7s. Constraints on input is following:T <= 10n <= 10^6This is my...

View Article


Travelling Plan problem dilemma

Hello everyone. I am totally new to Codechef. I would rather say I am below novice level. So I went on to practice my first problem Traveling Plan. I would like to know if I assumptions are right:...

View Article

ABCSTR - Editorial

PROBLEM LINK:PracticeContestAuthor:Konstantin SokolTester:Gerald AgapovEditorialist:Tasnim Imran SunnyDIFFICULTY:SimplePREREQUISITES:Ad-Hoc, MapPROBLEM:Given a string S which is consisted of characters...

View Article


Increment and Decrement operator in c??

Please help me guys for ?? i am always confuse while i am facing a problem related to pre and post - increment & decrements operators in c ?? i know basic rule of pre and post increment but after...

View Article

Help me debug SIGKILL error.

I have been trying to solve http://www.spoj.com/problems/SUMFOUR/ . But I am getting SIGKILL error in the 10th test case (which I presume is the largest input case). If possible, please help me...

View Article


wa in spoj Cobbled streets!!!

hey constantly getting WA..though i have applied kruskal algorithm..plzzz help me guys.http://www.spoj.com/problems/CSTREET/ .here my code http://ideone.com/pAhcao

View Article

BNGAME - Editorial

Problem link : contestpracticeDifficulty : EasyPre-requisites : Two pointersProblem : Calculate the minimum possible penalty for the game described.Explanation :The heart of the solution is the...

View Article

getting wrong answer in small factorial

include<stdio.h>int main(){ int a,i,j; double z; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d",&j);="" for(z="1;j">0;j--) z=z*j; printf("%.0lf\n",z); } return 0; }

View Article
Browsing all 39796 articles
Browse latest View live


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