#include <bits/stdc++.h>
using namespace std;
const int N = 20;
int n,wight;
int ans=0x3f3f3f3f;
int root[N],car[N];
int main()
{
int t,cnt =0 ;
int n,m,k;
cin >>t ;
while(t--){
cin >>n>> m;
memset(root,0,sizeof(root));
for(int i=1;i<n;i++){
int u,v ;cin >>u >> v;
root[u]++;
root[v]++ ;
}
if(root[m]>1&&(n-2)%2==1)cout<<"Ashish"<<endl;
else cout<<"Ayush"<<endl;
}
}
原文:https://www.cnblogs.com/QFNU-ACM/p/13035270.html