fork download
  1. #include <bits/stdc++.h>
  2. #include <ext/pb_ds/assoc_container.hpp>
  3. #include <ext/pb_ds/tree_policy.hpp>
  4. using namespace __gnu_pbds;
  5. using namespace std;
  6. #pragma GCC target("avx2")
  7. #pragma GCC optimize("O3")
  8. #pragma GCC optimize("unroll-loops")
  9. typedef long long ll;
  10. typedef vector <ll> vll;
  11. typedef set <ll> sll;
  12. typedef vector <vector<ll>> vvll;
  13. typedef set<pair<ll,ll>> spll;
  14. typedef vector <bool> vbl;
  15. typedef vector <pair<ll,ll>> vpll;
  16. typedef map <ll,ll> mll;
  17.  
  18. #define yen cout<<"YES"<<"\n"
  19. #define ye cout<<"YES"
  20. #define non cout<<"NO"<<"\n"
  21. #define no cout<<"NO"
  22. #define pb push_back
  23. #define bk break
  24. #define co continue
  25. #define ff first
  26. #define ss second
  27. #define f(i, a, b) for (long long i = (a); i <= (b); i++)
  28. #define fr(i, a, b) for (long long i = (b); i >= (a); i--)
  29.  
  30. ll LMA=LLONG_MAX;
  31. ll LMI=LLONG_MIN;
  32.  
  33. void pr(vector <ll> &v)
  34. {
  35. ll sz=v.size();
  36. sz-=2;
  37. for (ll i=1;i<=sz;i++)
  38. {
  39. cout<<v[i]<<" ";
  40. }
  41. cout<<"\n";
  42. }
  43.  
  44. void pr0(vector <ll> &v)
  45. {
  46. for (auto elem:v)
  47. {
  48. cout<<elem<<" ";
  49. }
  50. cout<<"\n";
  51. }
  52.  
  53. template<typename T>
  54. using ordered_set = tree<
  55. T,
  56. null_type,
  57. less<T>,
  58. rb_tree_tag,
  59. tree_order_statistics_node_update>;
  60.  
  61. int main()
  62. {
  63. ios_base::sync_with_stdio(false);
  64. cin.tie(0);
  65.  
  66. ll t=1;
  67. cin>>t;
  68.  
  69. while (t--)
  70. {
  71. ll n,k,m;
  72. cin>>n>>k>>m;
  73. if (m==1)
  74. {
  75. if (k<=(n-k-1))
  76. {
  77. cout<<"Draw"<<"\n";
  78. } else
  79. {
  80. cout<<"TanX"<<"\n";
  81. }
  82. } else
  83. {
  84. if ((n-k-1)<=k)
  85. {
  86. cout<<"Draw"<<"\n";
  87. } else
  88. {
  89. cout<<"Mario"<<"\n";
  90. }
  91. }
  92. }
  93.  
  94. return 0;
  95. }
Success #stdin #stdout 0.01s 5296KB
stdin
1
26 20 1
stdout
TanX