Strange Bug.

Правка en1, от rasterize, 2016-02-14 19:07:49

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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский rasterize 2016-12-16 23:10:55 4
en2 Английский rasterize 2016-12-16 23:10:16 398
en1 Английский rasterize 2016-02-14 19:07:49 466 Initial revision (published)