아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Intersect With Other Balls

시간 제한2초메모리 제한512 MB

요약
너비가 3r, 높이가 h인 통에 반지름 r인 공을 번갈아 떨어뜨릴 때, 완벽하게 둔 두 사람 중 누가 이기는지 판정한다.
난이도

보통10점 중 7점

유형
게임 이론, 기하, 수학
정답자
아직 제출이 없습니다

문제

And now for something completely different - an English statement.

Two players are taking turns throwing balls (circles of radius rr) into a rubbish bin (a rectangle of height hh and of width 3⋅r3 \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 rr and hh (1≤r,h≤108,2⋅r<h1 \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.

예제5

  1. 예제 1

    입력
    1 4
    
    예상 출력
    2
    
  2. 예제 2

    입력
    2 28
    
    예상 출력
    1
    
  3. 예제 3

    입력
    3 22
    
    예상 출력
    1
    
  4. 예제 4

    입력
    14 88
    
    예상 출력
    1
    
  5. 예제 5

    입력
    23 5100
    
    예상 출력
    2