Advertisement
Ankit_132

E

Feb 28th, 2024
1,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int t;
  6.     cin>>t;
  7.    
  8.     while(t--){
  9.         int n, a, b;
  10.         cin>>n>>a>>b;
  11.  
  12.         if (a > b)
  13.             cout << "Alice\n";
  14.         else if (a < b)
  15.         {
  16.             if (n <= a)
  17.                 cout << "Alice\n";
  18.             else
  19.                 cout << "Bob\n";
  20.         }
  21.         else
  22.         {
  23.             if (n % (a + 1) == 0)
  24.                 cout << "Bob\n";
  25.             else
  26.                 cout << "Alice\n";
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement