Saleh127

codeforces 1365A.cpp

Jun 7th, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define Faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. #define pi acos(-1)
  7. #define yes printf("YES\n");
  8. #define no printf("NO\n");
  9. int main()
  10. {
  11. Faster
  12. test
  13. {
  14. ll a[100][100],c[100]={0},d[100]={0},e=0,f,i,j,k,l,n,m;
  15. cin>>n>>m;
  16. for(i=0; i<n; i++)
  17. {
  18. for(j=0; j<m; j++)
  19. {
  20. cin>>a[i][j];
  21. if(a[i][j]==1)
  22. {
  23. c[i]=1;
  24. d[j]=1;
  25. }
  26. }
  27. }
  28. for(i=0;i<n;i++)
  29. {
  30. if(c[i]==0)
  31. {
  32. for(j=0;j<m;j++)
  33. {
  34. if(d[j]==0)
  35. {
  36. e++;
  37. c[i]=d[j]=1;
  38. break;
  39. }
  40. }
  41. }
  42. }
  43. if(e%2)
  44. printf("Ashish\n");
  45. else
  46. printf("Vivek\n");
  47. }
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment