You are not logged in. Please login at www.codechef.com to post your questions!

×

Code running perfectly on eclipse and command line but throws run time error(NZEC)

Hi,

I am new to codechef. I am trying to solve a problem. the solution is working fine on my system(eclipse)but shows runtime error(NZEC) on codechef. Trying to solve FarmerFeb april contest.

asked 08 Apr '14, 23:47

ankushjain's gravatar image

1★ankushjain
112
accept rate: 0%


Read some of the practice problem solutions in whatever language you are doing your program. You may have problems in input and output.

link

answered 09 Apr '14, 00:04

vikascingh's gravatar image

1★vikascingh
141119
accept rate: 0%

This link might be helpful for you Codechef FAQ

link
This answer is marked "community wiki".

answered 09 Apr '14, 00:01

hkbharath's gravatar image

3★hkbharath
1492714
accept rate: 9%

thanks vikas and bharath. I checked the FAQ it helped me get to know many things but it didn't solve my NZEC problem. I also saw few practice problems. even that didn't help out. I got wrong answer as the result of submission yesterday. When I tried to execute same code today it is giving me NZEC error instead of wrong answer. I don't understand this.

link

answered 09 Apr '14, 01:29

ankushjain's gravatar image

1★ankushjain
112
accept rate: 0%

In which programming language are you programming? I see WA for your Java submission, TCL and JAR gets NZEC...

(09 Apr '14, 10:54) betlista ♦♦3★

I am programming in java .Since i was getting a NZEC in java i tried to export the program to a jar file and try.. but even with jar i was getting the same issue. I don't know TCL i might have by mistake pasted the java code in TCL and submitted.

(09 Apr '14, 23:38) ankushjain1★

Apply try-catch to parts of your code and then try to figure out which part of the code gives you NZEC. Or else one more thing can be done. Write a random input generator and check your code for those random inputs considering the constraints in the problem.

(10 Apr '14, 00:24) vermashubhang5★

i tried random inputs on my system and its working fine. regarding try catch i will try that and get back. BTW thanks. :)

(10 Apr '14, 01:04) ankushjain1★

bro i suggest to try it in C or C++. do very basic coding. even memset() of C++ not allowed here sometimes(i myself experienced it last month).

link

answered 10 Apr '14, 00:39

garakchy's gravatar image

1★garakchy
1.1k163048
accept rate: 1%

edited 10 Apr '14, 00:38

1

thanks for the suggestion garakchy. I will give a try.

(10 Apr '14, 01:00) ankushjain1★
toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,313
×434
×16

question asked: 08 Apr '14, 23:47

question was seen: 3,611 times

last updated: 10 Apr '14, 01:04