fork download
  1. #include<bits/stdc++.h>
  2. #define ll long long int
  3. #define vec vector<ll>
  4. #define f(var,a,b) for(ll var = a ; var < b ; var++ )
  5. #define fr(var,a,b) for(ll var = a ; var > b ; var-- )
  6. #define fasthoja ios_base::sync_with_stdio(false); cin.tie(NULL);
  7. using namespace std;
  8. void att1(ll n) {
  9. if( n == 1 ) cout << "Bob\n";
  10. else if( n == 2 ) cout << "Alice\n";
  11. else if( n == 3 ) cout << "Bob\n";
  12. else {
  13. ll setBit = __builtin_popcount(n);
  14. if( setBit == 1 && (n % 2 == 0) ) cout << "Draw\n";
  15. else cout << "Bob\n";
  16. }
  17. }
  18. int main(void){
  19. fasthoja;
  20. ll t; cin>>t;
  21. while(t--){
  22. ll n; cin >> n;
  23. att1(n);
  24. }//end of test case loop
  25. return 0;
  26. }
Success #stdin #stdout 0s 4288KB
stdin
3
3
1
4
stdout
Bob
Bob
Draw