Ups and Downs-getting runtime error(NZEC)

My code is running fine on my computer (I am using eclipse IDE) but it is getting RUN time Error Can somebody please help?
My code-http://www.codechef.com/viewsolution/4138313

I code in C++. So, I can’t tell you whats wrong with your code but I can tell you about NZEC error (Common in C++/Java)

Why do I get an NZEC? NZEC stands for Non Zero Exit Code. Usually this error occurs when the code returns a non-zero value from main() function or if you omit an return 0; from the code. Other languages like Java/C++ could generate this error if they throw an exception which was not caught (e.g. Trying to allocate too much memory in a vector).

So for Java : NZEC will usually mean that your program either crashed or raised an uncaught exception.

Happy Coding :slight_smile:

1 Like