Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- const int maxn = 10 + 100;
- int n, row, col;
- int dfs(int row, int col) {
- if (row == 0) {
- return 0;
- }
- int tmp = dfs(row - 1, col >> 1);
- if (col & 1) {
- tmp ^= 1;
- }
- return tmp;
- }
- int main() {
- #ifdef ExRoc
- freopen("test.txt", "r", stdin);
- #endif // ExRoc
- cin >> n;
- while (n--) {
- cin >> row >> col;
- int ans = dfs(row - 1, col - 1);
- cout << (ans == 0 ? "RED" : "BLACK ") << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement