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

George_Aloyan[PTS_Obninsk][MIPT][IPG][ALIGN][YANDEX] WA №3 [1] // Problem 2020. Traffic Jam in Flower Town 21 Jul 2015 20:05
Any ideas?

http://ideone.com/ZFtToc

I don't see what can be wrong with it...
Nataraj Re: WA №3 // Problem 2020. Traffic Jam in Flower Town 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...