| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 512 MB | 15 | 0 | 0 | 0.000% |
Whenever the weather outside is bad, Lora and Bobi enjoy playing board games together. One of their favorite games is the board game Activity – in this task we will describe a generalization of the game.
The game consists of a strip divided in N spaces numbered from 1 to N. Each of the two players (Lora and Bobi) has a token that is initially placed on the space numbered 1. The players take turns to move their own token forwards. In a single turn the rules are as follows:
Note that each player must make a move on their turn and cannot “pass”. The winner is the player whose token ends up on space number N first. As a lady, Lora gets to make the first move.
A single game can be fully described by the quadruple (N, L, B, K). Now Lora and Bobi are wondering who would win if they both play optimally given different parameters for the game. It is possible that with optimal strategy from both players a game continues forever. In such case we consider the game to be a draw.
On the first line of the standard input is a single integer T – the number of games that your program should process.
Each of the next T lines contains 4 space-separated integers – N, L, B and K – respectively the amount of spaces in the game, Lora’s maximum move, Bobi’s maximum move and the number of spaces that one gets pushed back when the two tokens end up on the same space.
For every game output on a separate line the result of the game with the given parameters assuming that both players play optimally. The possibilities are:
| 번호 | 배점 | 제한 |
|---|---|---|
| 1 | 8 | 3 ≤ N ≤ 6, 1 ≤ T ≤ 50 |
| 2 | 14 | 3 ≤ N ≤ 50, 1 ≤ T ≤ 50 |
| 3 | 19 | 3 ≤ N ≤ 200, 1 ≤ T ≤ 100, 1 ≤ sum of all N ≤ 2 000 |
| 4 | 14 | 3 ≤ N ≤ 2 000, 1 ≤ T ≤ 1 000, 1 ≤ sum of all N ≤ 20 000, The answer is “Lora” or “Draw” |
| 5 | 23 | 3 ≤ N ≤ 2 000, 1 ≤ T ≤ 1 000, 1 ≤ sum of all N ≤ 20 000 |
| 6 | 22 | 3 ≤ N ≤ 200 000, 1 ≤ T ≤ 1 000, 1 ≤ sum of all N ≤ 2 000 000 |
3 10 4 3 2 5 2 3 1 4 2 2 2
Lora Bobi Draw