I'm not sure if this is a bug, but would like to know why is this wrong.
http://mirror.codeforces.com/contest/761/submission/24331207
http://mirror.codeforces.com/contest/761/submission/24331035
Both of these codes are the same except one defines INF as 10e9, and the other as 1000000000. Yet one gets WA and the other didn't. Why is this? Thanks :)
Good day to you!
Well because "temp" might not be initialized when you use it:
If the first condition is not "OK" and temp was not set yet, it could bring in an undefined value (such as -INF).
Setting it to INF shall get you AC.
But no clue whether the change of inf can influence it somehow (but as you can see, those INF's are different numbers, so perhaps something "in your code" [first inf is 10^10 second just 10^9] )
Good Luck & Have Nice Day.
That's brilliant! Can't believe I made such a stupid mistake, thanks a lot! :)
However on the code defining inf as 10^9 and did not initialize temp either, not sure why did that AC. :/
10e9 is actually 1010. Try defining INF as 1e9.
Still doesn't work. It's as Morass said, I did not initialize the value of temp. But thanks anyway!
bool trump[3];
Trump Supporter detected.