Hello, I encountered a strange bug while solving [POJ 3278](http://poj.org/problem?id=3278) .↵
↵
here's my AC solution: http://ideone.com/FdyTlU↵
↵
StrangelyI get WAif I submit my solution using G++ if Iand remove linthe 38 which shouldn't serve any purpose (th line I get a WA verdict. ↵
Now I tried using random other values instead of -1and still got AC) But works on C++ (even without including the line)to see if it mattered and strangely it doesn't. As long as I return something ↵
I pass the tests, it doesn't matter what I return, So I don't really see the point of the line if it's essentially just unreachable code. ↵
SIDE NOTE: Submitting the solution using C++ passes the tests which makes the situation even more confusing.↵
↵
Is there something related to the compilers that's causesing this? Or did I somehow invoke undefined behavior?↵
↵
↵
here's my AC solution: http://ideone.com/FdyTlU↵
↵
Strangely
Now I tried using random other values instead of -1
I pass the tests, it doesn't matter what I return, So I don't really see the point of the line if it's essentially just unreachable code. ↵
SIDE NOTE: Submitting the solution using C++ passes the tests which makes the situation even more confusing.↵
↵
Is there something related to the compilers that's caus