Saleh127

CF 1363C

Sep 12th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. test
  11. {
  12. ll n,x,a,c,i,j=0;
  13. cin>>n>>x;
  14. for(i=0;i<n-1;i++)
  15. {
  16. cin>>a>>c;
  17. if(a==x || c==x) j++;
  18. }
  19. if(j<=1) cout<<"Ayush"<<endl;
  20. else
  21. {
  22. if((n-1)%2) cout<<"Ayush"<<endl;
  23. else cout<<"Ashish"<<endl;
  24.  
  25. }
  26. }
  27. return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment