ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1565. The Duel for Three

Al.Cash Why WA#4? [3] // Problem 1565. The Duel for Three 27 Nov 2007 20:49
I see many people had this WA. Can someone give me a hint about it?
I think it will be useful for others.
Razdolbay from SIS Re: Why WA#4? [1] // Problem 1565. The Duel for Three 3 Dec 2007 02:17
I had WA 4 because of wrong supposition:

let probabilities are p0=1.0, p1, p2
p1 > p2
"p1" always should shoot into "p0"
"p2" always should shoot into the air
Al.Cash Re: Why WA#4? // Problem 1565. The Duel for Three 15 Dec 2007 13:27
Thank you! There are really much more cases.
Otrebus Re: Why WA#4? // Problem 1565. The Duel for Three 10 Oct 2021 22:27
Another way is to type (i-1) instead of (1-i) somewhere in your code without noticing and then spend 90 minutes going over the code and try to figure out how your logic could possibly be wrong.