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 1286. Starship Travel

Vasily Slesarev WA 26 [3] // Problem 1286. Starship Travel 15 Jul 2009 19:40
Have somebody any things about test N 26? Thank you!
Vasily Slesarev Re: WA 26 [2] // Problem 1286. Starship Travel 15 Jul 2009 22:50
I have founf a mistake.
AC now.
IgorKoval [PskovSU] Re: WA 26 [1] // Problem 1286. Starship Travel 17 Sep 2013 03:08
I had WA 26 too. Stuped mistake. =)

Was:
                (  v + f + i*p + k*q )%2==0 &&
                ( -v + f + i*p - k*q )%2==0 &&
                (  u + s - i*q - k*p )%2==0 &&
                ( -u + s - i*q + k*p )%2==0

This get AC:
                (  v + f + i*(p/g) + k*(q/g) )%2==0 &&
                ( -v + f + i*(p/g) - k*(q/g) )%2==0 &&
                (  u + s - i*(q/g) - k*(p/g) )%2==0 &&
                ( -u + s - i*(q/g) + k*(p/g) )%2==0
example12 Re: WA 26 // Problem 1286. Starship Travel 18 Feb 2014 20:33
i guess || instead of && ?