-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA_Game_with_Board.cpp
152 lines (136 loc) · 2.61 KB
/
A_Game_with_Board.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
// DATE: 12-06-2023
// TIME: 20-56-06
#include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define all(a) a.begin(), a.end()
#define forn(i, n) for (int i = 0; i < n; i++)
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define dep(i, b, a) for (int i = b; i >= a; i--)
#define print(x) cout << x << "\n"
#define vin(v) \
for (auto &x : v) \
cin >> x
// #define vin() for(ll i=0;i<n;i++) cin>>v[i]
#define vout(v) \
for (auto x : v) \
cout << x << " "; \
cout << endl
// #define vout() for(ll i=0;i<n;i++) cout<<v[i]<<" "
// #define vout(a,b,v) for(int i=a;i<b;i++){cout<<v[i]<<" ";}cout<<"\n";
#define vect(type1, name) vector<type1> name
#define vectp(type1, type2, name) vector<pair<type1, type2>> name
#define set(type, name) set<type> name
#define mpp(type1, type2, name) map<type1, type2> name
const int M = 1e9 + 7;
const int N = 1e5 + 7;
#define Pi 3.1415926535897932384626
// extern int x;
int gcd(int a, int b)
{
while (b != 0)
{
int rem = a % b;
a = b;
b = rem;
}
return a;
}
ll lcm(ll a, ll b)
{
return (a * b) / __gcd(a, b);
}
ll isPalindrome(string S)
{
string P = S;
reverse(P.begin(), P.end());
if (S == P)
return true;
else
return false;
}
bool check_palindrome(ll n)
{
ll n1 = n;
ll res = 0;
while (n)
{
res = res * 10 + n % 10;
n /= 10;
}
return res == n1;
}
ll isprime(ll x)
{
for (ll i = 2; i <= sqrtl(x); i++)
{
/* code */
if (x % i == 0)
return false;
}
return true;
}
ll fact(ll n)
{
if ((n == 0) || (n == 1))
return 1;
else
return (((n % M) * (fact(n - 1) % M)) % M);
}
string decToBinary(ll n)
{
// Size of an integer is assumed to be 32 bits
string s = "";
for (ll i = 31; i >= 0; i--)
{
ll k = n >> i;
if (k & 1)
// cout << "1";
s = "1" + s;
else
// cout << "0";
s = "0" + s;
}
reverse(s.begin(), s.end());
return s;
}
ll sum_of_digits(ll x)
{
ll s = 0;
while (x)
{
s += x % 10;
x /= 10;
}
return s;
}
void solve()
{
int n;
cin >> n;
// if (n >= 5)
// {
// cout << "Alice" << '\n';
// }
// // continue;
// else
// cout << "Bob" << '\n';
if (n <= 4)
print("Bob");
else
print("Alice");
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(NULL);
ll t = 1;
cin >> t;
while (t--)
{
solve();
}
return 0;
}