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 2020. Traffic Jam in Flower Town

WA №3
Posted by George_Aloyan[PTS Obninsk][MIPT_FFKE] 21 Jul 2015 20:05
Any ideas?

http://ideone.com/ZFtToc

I don't see what can be wrong with it...
Re: WA №3
Posted by Nataraj 26 Apr 2016 18:37
I had exactly the same mistake at the beginning.
Check this case:
FFF
LLL
Answer should be 6 (not 5).

Hint: In your second check the counter 'j' could be advanced as the result of the first check
which is wrong...