#P11308. 茫茫的不归路
茫茫的不归路
Description
Specifically, there are teams, each with a maximum capacity of players. Currently, players have already been assigned to teams, with no team exceeding its capacity limit.
Little 's squad of players enters the room. Without changing the team assignments of the existing players, if they can all join the same team without exceeding the team capacity limit, they will do so. Otherwise, the squad will be split across different teams.
Given n, m, k, p, determine the possibility scenario for Little 's squad to join the same team, considering all possible team distributions of the existing players (see output format for details).
Input Format
Multiple test cases. The first line contains an integer T, representing the number of test cases.
For each test case:
One line containing four integers , as described in the problem.
Output Format
For each test case, output one of these three possibilities:
Togetherindicates the squad will definitely be able to join the same team regardless of existing player distribution;Chanceindicates there exist some distributions of existing players where the squad can join the same team;Divideindicates the squad will inevitably be split across different teams regardless of existing player distribution.
10
3 3 3 1
3 3 4 5
4 4 4 12
4 4 3 8
10 10 7 34
10 10 8 34
12 11 11 12
12 11 12 12
9 9 1 80
9 9 6 70
Together
Divide
Chance
Chance
Together
Chance
Chance
Divide
Together
Chance
Hint
「Sample 1 Explanation」
For the first test case, regardless of which team the one existing player is in, at least two teams will be empty.
Therefore, a squad of 3 players can definitely fit in one team, thus outputting Together.
「Data Constraints」
- For 40% of test cases: ,,;
- For another 20% of test cases, the output will not be
Together. - For 100% of test cases: ,,,,.
京公网安备 11011102002149号