Register and join over 40,000 other developers!
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
How to make code run differently depending on the platform it is running on?
xarzu - Apr 05 2019 09:17 AM
Recent Blog Entries
Recent Status Updates
- Managed C++
- Visual Basic 4 / 5 / 6
- linked list
- hello world
3 replies to this topic
Posted 07 August 2014 - 06:27 AM
3rd JUNIOR BALKAN OLYMPIAD IN INFORMATICS
November 27 – 29, 2009
Task 1. HANDSHAKES
Before sport contest event all participants are lined up, each one is turned left or right.
Simultaneously, all participants in the row who at present are facing each other shake hands
and then turn around to face the participant on their other side. The time for one handshake
and a turn is 1 second. The rest of the players keep their orientation. Then follow new
handshakes and turnings, etc.
The event will begin when the handshakes end. If they finish at all.
From the standard input is read a string of letters L and R, where L means a player, turned to
the left at the starting moment, while R means a player turned to the right. The length of the
sting is 100000 at max.
At the standard output to be brought out divided by space: the time for the handshakes and all
handshakes made by the players. If the handshakes never cease then to be brought out