CF1451D.Circle Game

普及/提高-

通过率:0%

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)(0,0) . In one move a player must increase either the xx coordinate or the yy coordinate of the token by exactly kk . In doing so, the player must ensure that the token stays within a (Euclidean) distance dd from (0,0)(0,0) .

In other words, if after a move the coordinates of the token are (p,q)(p,q) , then p2+q2d2p^2 + q^2 \leq d^2 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.

输入格式

The first line contains a single integer tt ( 1t1001 \leq t \leq 100 ) — the number of test cases.

The only line of each test case contains two space separated integers dd ( 1d1051 \leq d \leq 10^5 ) and kk ( 1kd1 \leq k \leq d ).

输出格式

For each test case, if Ashish wins the game, print "Ashish", otherwise print "Utkarsh" (without the quotes).

输入输出样例

  • 输入#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)(0, 0) \xrightarrow{\text{Ashish }} (0, 1) \xrightarrow{\text{Utkarsh }} (0, 2) .

Ashish has no moves left, so Utkarsh wins.

首页