Logo
(追記) (追記ここまで)

3361번 - Handshakes 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB73201935.185%

문제

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 NEVEREND.

제한

예제 입력 1

RLLRLRR

예제 출력 1

3 4

힌트

출처

Olympiad > Balkan Olympiad in Informatics > Junior Balkan Olympiad in Informatics > JBOI 2009 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /