Advertisement
ssrtatarin

Untitled

Feb 6th, 2022
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4. typedef __int128 lll;
  5. typedef long long ll;
  6. typedef long double ld;
  7. ll inf = 1e9+1, mod = 1e9 + 7;
  8. const int N = 1e6;
  9. #define all(a) a.begin(),a.end()
  10. #define pb push_back
  11. #define get(a) for(int i = 0; i < (int)a.size(); ++i) cout << a[i] << ' ';
  12. #define SOLVE int t; cin >> t; while(t--) solve();
  13.  
  14. struct mosh
  15. {
  16. int first, second, third;
  17. };
  18. std::vector<int>g[N];
  19.  
  20. bool compare2(int a, int b){
  21. return a > b;
  22. }
  23. bool compare(mosh a, mosh b){
  24. if(a.first!= b.first) return a.first > b.first;
  25. else if(a.first == b.first && a.second!= b.second) return a.second < b.second;
  26. else return a.third < b.third;
  27.  
  28. }
  29.  
  30. struct point{
  31. ll first, type;
  32. };
  33.  
  34. bool compare3(point a, point b){
  35. if(a.type == b.type) return a.first < b.first;
  36. else return a.type > b.type;
  37. }
  38. ll pref[N];
  39. ll pref_x[N];
  40. void solve(){
  41.  
  42. ll n, x, y;
  43. cin >> n >> x >> y;
  44. vector<ll>arr, arr2;
  45. ll sum = 0;
  46. ll cnt = 0;
  47. if(x%2!=0) ++cnt;
  48. for(ll i = 0; i < n; ++i){
  49. ll a;
  50. cin >> a;
  51. arr.pb(a);
  52. if(a%2!=0) ++cnt;
  53.  
  54.  
  55. }
  56. if(cnt%2!=0 && y%2!=0) cout << "Alice" << '\n';
  57. else if(cnt%2==0 && y%2==0) cout << "Alice\n";
  58. else cout << "Bob\n";
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. }
  68.  
  69.  
  70.  
  71. int main() {
  72. #ifdef anime
  73.  
  74. freopen("input1.txt", "r", stdin);
  75. freopen("output1.txt", "w", stdout);
  76. #endif
  77. srand(time(nullptr));
  78. ios_base::sync_with_stdio(false);
  79. cin.tie(nullptr);
  80. cout.tie(nullptr);
  81. SOLVE;
  82.  
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement