runtime error(NJEC)
what does meant by runtime error(NJEC)?include<stdio.h>void main() { int i,j,n,temp; scanf("%d",&n); int a[n]; for(i=0;i<n;i++) scanf("%d",&a[i]);="" for(i="0;i<(n-1);i++)" {=""...
View ArticleTLE for Sums in a Triangle with Memoization
Hi,I tried this code for Sums in a Triangle:import sys T = int(sys.stdin.readline()) memo = {} def solve(i, j, m, limit): # print "i:"+str(i) if i==limit: return 0 if (i, j) in memo: # print "Reused:",...
View ArticleMike and Task Packages WA in Python
Hi,I coded this solution for MIKE2:from __future__ import division def read_mapped(func=lambda x:x): return map(func, raw_input().split(" ")) def read_array(N, func): l = [] for i in xrange(N):...
View ArticleMAXCOUNT : python code NZEC error
I submitted a solution to MAXCOUNT problem in python 2.7 , but it shows NZEC. why is it so? I want to know how to submit python codes? Do I need to include numpy, sys , scipy, etc. libraries in the...
View Articleshowing wrong answer when it is working f9 on windows 7
Chef-jumping ques http://www.codechef.com/MAY14/problems/OJUMPSFollowing is my code, which is a success on ideone.com, the onl9 compiler:public class Main{public static void main (java.lang.String[]...
View ArticleANUBGC question :)
Hi,Awesome cook-off and hats off to setter for so many good problems!!I know that the solution for this problem must rely on the "constructive/deterministic side" i.e. we must be able to construct...
View ArticleWhat is the method to solve ANUBGC?
How do we calculate the number of numbers less than N which contain a certain digit 'd', within time limit?
View ArticleThe Next Palindrome
I am unable to find the bug in this code.Please help me understand it.Thanks. http://ideone.com/Z62TxA
View ArticleANUBTT Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:HARD PREREQUISITES:Min Cost Max FlowPROBLEM:You are given tree with N nodes each node being...
View ArticleANUDTC Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:CAKEWALK PREREQUISITES:AD-HOC PROBLEM:Given a circle, you can make cuts at positive...
View ArticleANUUND Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:EASY PREREQUISITES:AD-HOC, sorting PROBLEM:Given an array A. Rearrange the array in such a...
View ArticleANUSAR Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:MEDIUM HARD PREREQUISITES:Suffix Array, Suffix Tree, dfs, Segment tree, Fenwick Tree or BIT....
View Articleups and downs ..WHAT WAS MY MISTAKE
include<iostream>using namespace std; void merge(long long int *A,int p,int q,int r) {int n1,n2,i,j,L[1000],R[1000]; n1=q-p+1; n2=r-q; for(i=1;i<=n1;++i) { L[i]=A[p+i-1]; }...
View ArticleANUBGC Editorial
PROBLEM LINK:PracticeContestAuthor:Anudeep NekkantiTester:Gerald AgapovEditorialist:Praveen DhinwaDIFFICULTY:EASY MEDIUM PREREQUISITES:dynamic programming PROBLEM:You are given an integer N. You select...
View Articlefctrl2 getting wrong answer
include<stdio.h>int fact(int);int main() { int t,i=1,a[100],flag; scanf("%d",&t); if(t>=1&&t<=100) { for(i=0;i<t;i++) { scanf("%d",&flag); a[i]=fact(flag); } }...
View Articlemerging two sorted linked lists
my code doesnt produce output.. please see where iam doing wrong as iam not so gud in dealing with pointers http://ideone.com/SFfesf
View ArticleHow to Solve this Problem?
DIVISION 1:Problem CPlease if someone could provide detailed explanation of this problem.I went through tutorial but couldn't follow much.
View ArticleTABUS - Editorial
PROBLEM LINKSPracticeContestDIFFICULTYEASYPREREQUISITESBinary Search, Dynamic Programming, Graph TheoryPROBLEMYou are given N bus stations and M buses that run between these bus stations. Each bus is...
View ArticleLEDIV - Editorial
PROBLEM LINKPracticeContestDIFFICULTYSIMPLEPREREQUISITESSimple MathPROBLEMYou are given a list of numbers. You have to find the smalelst number which divides all these numbers.QUICK EXPLANATIONTo the...
View Articlepython vs Java ??
Somebody please answerHere is a very simple spoj question link http://www.spoj.com/problems/JULKA/my python code is getting WA where as the same logic Java code is getting AC why what am i...
View Article