Hello, I encountered a strange bug while solving POJ 3278 .
here's my AC solution: http://ideone.com/FdyTlU
Strangely I get WA using G++ if I remove line 38 which shouldn't serve any purpose (I tried using random values instead of -1 and still got AC) But works on C++ (even without including the line) Is there something related to the compilers that causes this? Or did I somehow invoke undefined behavior?