Why giving nrez error BACREP


You should not post code in this manner.

so how should I post?

Please either format your code or link to your submission :slight_smile:

okay done.I’m not getting why it is giving nrez error

1 Like

I just tried this testcase:

3 6
2 1
3 1
371 629 595 
? 3
? 2
? 3
+ 3 731
+ 2 578
? 2

and got no output from your program.

1 Like

what is error.it is working for some other cases

I’ll leave you to debug that :slight_smile: First, you should find out why nothing at all is being printed. Hint: An exception is being thrown and swallowed.


it is working now

1 Like

I mean giving nrez error but that testcase is working

can anyone answer this?

I just tried this large (14MB), random testcase with your latest solution and it rapidly reached 3GB of RAM usage and then crashed:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at Test$GraphNode.<init>(abbyankit-BACREP.java:201)
        at Test.main(abbyankit-BACREP.java:14)

1 Like