Responsive image

问题 2161 --Circle Game

2161: Circle Game

时间限制: 2 Sec  内存限制: 256 MB
提交: 34  解决: 9
[提交][状态][讨论版][命题人:]

题目描述

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.

输入描述

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≤10^5) and k(1≤k≤d). 

输出描述

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

样例输入

5
2 1
5 2
10 3
25 4
15441 33

样例输出

Utkarsh
Ashish
Utkarsh
Utkarsh
Ashish

来源

[提交][状态]
ACM算法攻关部
  • Anything about this OnlineJudge, Please Contact Administrator. Click add QQ

    OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap

    Copyright 2016 ACM算法攻关部
    关于网站改版