시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 (추가 시간 없음) | 512 MB | 12 | 9 | 9 | 81.818% |
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 4
2
2 28
1
3 22
1
14 88
1
23 5100
2