1 / 12
Nov 2004

Any Exception of the Java Virtual Machine will cause RE NZEC. This includes, but is not limited to, uncaught exceptions thrown by your classes and standard classes (including class/method reflection), and critical errors of various elements of the JVM (e.g. out-of-memory error, out-of-stack-space error, cannot-write-to-file error, cannot-find-startup-class error, all sorts of garbage collector errors). Try not to access weird elements of the SUN Java environment (e.g. locale files, time zone information, graphics), as these are not guaranteed to work.

3 months later

how come? im not accessing anything weird (not even using anything outside java.lang and java.util) in my code and i get the runtime error (NZEC) how come?? it's working perfectly in my editor.
what else can i check?

I never wrote that standard java classes didn't throw exceptions. In fact, I wrote quite clearly that they do. For instance, the method Integer.parseInt throws an exception if you try to read in something of excessive size.

Just in case this was not meant as a joke, I'll answer: if testing programs in your editor were sufficient proof of their correctness, whyever would you want to submit them to an online judge? 8)

You are right Adrian, I express myself wrongly... you mentioned weird elements..... anyway.. I should have say "I didnt use anything weird, I didnt access anything weird, like a file or something"

How come NZEC are cause by exceptions? if my program test it and it works? how can I check what's wrong then? probably submited in another language wouldnt make so many problems and the time limit would be just perfect....

Catching the exceptions would at least avoid the NZEC. But it seems you are not expecting that your program throws exceptions if everything works like expected. So you should search for bugs in your program which could cause an exception (probably especially in the input reading part).
Using something that is not inside java.lang or java.util does not lead to exceptions. I successfully used java.math for example, and I think generally everything that you need for an acm problem is supported.

1 year later

I am having the same problem and it is really frustrating. My program works perfectly on my system, but when I put it into the judge it doesn't. Is there any way to view the specific exception and/or the specific test data used?

1 year later

Bardzo fajne i pomysłowe zadanko smile no ale trudne nie jest, najlepiej niech siedzi w średnich :]

No i w C++ łatwiej je zrobić niż w czystym C, gdyż w C++ nigdy nie pojawia się Błąd wykonania (NZEC). Ale jak widać w obu się da ;]

4 months later

Może ktoś podpowiedzieć jak zainicjować nową zmienną w C bez użycia średnika question

1 year later

Coś jest nie tak z zadaniem
zgłasza błąd systemu dla poprawnych kodów
jak

int main(){}//c++

dla poprawnych rozwiązań (akceptowanych 10 dni temu) też zwraca błąd systemu

Mam to samo, co kolega wyżej: Jest poprawny kod w tym zadaniu, ale wywala "błąd systemu".

Suggested Topics

Want to read more? Browse other topics in JAVA based languages or view latest topics.