Format of java program for submission on ACM-ICPC amritapuri warm up contest???

I tried to submit a java solution on “mooshak” server for warm up contest of acm amritapuri on 1st november.

I was getting the exact same answer for every input and my output was formatted as given on the example of the question, but I was getting some runtime error named as “too long truncated”.

I tried everything but it was not working. I don’t know what is the problem with the output format required for this contest…I was using System.out for output.

Has anybody else encountered the same problem…or if anyone know how to make it work??

1 Like

As far as I know, there was no “ACCEPTED” solution in Java for the round held on the 1st of November. We even asked a question regarding the same to Online Admins during the contest, and got no reply. Then, we translated the same code to CPP and it got ACCEPTED.

In the 3rd Warm Up contest, we used same Java syntax that we had been using on CodeChef, and both PrintWriter and System.out worked well that day. No idea why such an issue with Java this time.

And the error doesn’t seem to be with output, it seems that Memory Limits were not well defined. Too many Java programmers got Memory Limit Exceeded. In our case, our code used well below 64 MB, and Mooshak ends up saying it used above 1 GB! Even after nearly 5 optimizations, it just gave exactly same memory consumption, which is weird.

1 Like

Same problem even when I used PrintWriter…

Right…it was same with me too…that was just too frustrating, I have never heard about that kinda runtime error…can anyone post his/her code written in java for that contest???

I have just checked some solutions of previous online contest of ACM ICPC and I doubt that I would have encountered the above problem because I didn’t use “public” in “class Main”…Can that be the reason for above mentioned runtime error?