#include <bits/stdc++.h>
#define int long long
using namespace std;
int solve(int x) {
if (x % 4 == 0)
return x;
if (x % 4 == 1)
return 1;
if (x % 4 == 2)
return x + 1;
return 0;
}
signed main() {
int T, ans = 0;
cin >> T;
while (T --) {
int a, b;
cin >> a >> b;
ans ^= solve(a - 1) ^ solve(a + b - 1);
}
if (ans)
cout << "tolik\n";
else
cout << "bolik\n";
return 0;
}
CodeForces 15C【Nim游戏】【博弈论】
最新推荐文章于 2022-10-08 22:54:42 发布