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

23681번 - Intersect With Other Balls 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 (추가 시간 없음) 512 MB33111168.750%

문제

And now for something completely different - an English statement.

Two players are taking turns throwing balls (circles of radius $r$) into a rubbish bin (a rectangle of height $h$ and of width 3ドル \cdot r$).

When the player throws a ball, he initially places the ball strictly inside the bin in such way, that it touches the upper boundary of the bin and does not intersect with other balls. It may touch other balls though (not like it matters with integer inputs). Then the ball moves strictly down until it touches the bottom of the bin or another ball. After that it stops and doesn't move for the rest of game.

The player who can not make a turn (i.e. there is not enough space to initially place the ball) loses.

Who will win, assuming perfect play?

입력

The only line contains two integers $r$ and $h$ (1ドル \leq r, h \leq 10^8, 2 \cdot r < h$), the radius of the balls (also one third of the width of the bin) and the height of the bin respectively.

출력

Print 1 if the player who goes first wins and 2 otherwise.

제한

예제 입력 1

1 4

예제 출력 1

2

예제 입력 2

2 28

예제 출력 2

1

예제 입력 3

3 22

예제 출력 3

1

예제 입력 4

14 88

예제 출력 4

1

예제 입력 5

23 5100

예제 출력 5

2

힌트

출처

Contest > Open Cup > 2018/2019 Season > Stage 13: Grand Prix of Bytedance I번

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

출처

대학교 대회

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

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