标签:stream define cin pac begin col cout max back
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define all(x) x.begin(),x.end() #define pb(x) push_back(x) #define ppc __builtin_popcount #define ppcll __builtin_popcountll template<typename T1,typename T2>istream& operator>>(istream& in,pair<T1,T2>&p){in>>p.first>>p.second;return in;} template<typename T1,typename T2>ostream& operator<<(ostream&out,pair<T1,T2>&p){out<<p.first<<" "<<p.second;return out;} template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;} template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;} signed main() { ios::sync_with_stdio(false); int t; cin>>t; string a="Alice",b="Bob"; while(t--){ int n; cin>>n; if(n==1)cout<<b<<"\n"; else if(ppcll(n)==1){ int cnt=0; while(n)cnt++,n/=2; if(cnt%2==0) cout<<b<<"\n"; else cout<<a<<"\n"; } else if(n&1)cout<<b<<"\n"; else cout<<a<<"\n"; } }
Codeforces Round #726 (Div. 2)
标签:stream define cin pac begin col cout max back
原文地址:https://www.cnblogs.com/qq1415584788/p/14902587.html