CF1451D.Circle Game
普及+/提高
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Utkarsh is forced to play yet another one of Ashish's games. The game progresses turn by turn and as usual, Ashish moves first.
Consider the 2D plane. There is a token which is initially at (0,0). In one move a player must increase either the x coordinate or the y coordinate of the token by exactly k. In doing so, the player must ensure that the token stays within a (Euclidean) distance d from (0,0).
In other words, if after a move the coordinates of the token are (p,q), then p2+q2≤d2 must hold.
The game ends when a player is unable to make a move. It can be shown that the game will end in a finite number of moves. If both players play optimally, determine who will win.
乌塔卡什被迫再次参加阿西什设计的某个游戏。游戏轮流进行,且照例由阿西什先手。
考虑二维平面。初始时,一个标记位于点 (0,0)。在一次操作中,玩家必须将标记的 x 坐标或 y 坐标恰好增加 k。在此过程中,玩家必须确保标记始终位于以 (0,0) 为圆心、欧几里得距离不超过 d 的范围内。
换言之,若某次操作后标记坐标为 (p,q),则必须满足 p2+q2≤d2。
当一名玩家无法进行任何合法操作时,游戏结束。可以证明,游戏必将在有限步内结束。若双方均采取最优策略,请判断谁将获胜。
输入格式
The first line contains a single integer t (1≤t≤100) — the number of test cases.
The only line of each test case contains two space separated integers d (1≤d≤105) and k (1≤k≤d).
第一行包含一个整数 t(1≤t≤100)—— 测试用例的数量。
每个测试用例仅有一行,包含两个以空格分隔的整数 d(1≤d≤105)和 k(1≤k≤d)。
输出格式
For each test case, if Ashish wins the game, print "Ashish", otherwise print "Utkarsh" (without the quotes).
对于每个测试用例,如果阿西什赢得游戏,则输出 “Ashish”,否则输出 “Utkarsh”(不带引号)。
输入输出样例
输入#1
5 2 1 5 2 10 3 25 4 15441 33
输出#1
Utkarsh Ashish Utkarsh Utkarsh Ashish
说明/提示
In the first test case, one possible sequence of moves can be
(0,0)Ashish (0,1)Utkarsh (0,2).
Ashish has no moves left, so Utkarsh wins.

在第一个测试用例中,一种可能的移动序列为:
(0,0)阿希什 (0,1)乌特卡尔什 (0,2)。
阿希什已无合法移动可走,因此乌特卡尔什获胜。

输入解题思路,AI测评打分。不知道怎么写?