Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- const int N = 1005;
- int main(){
- ios_base::sync_with_stdio(false); cin.tie(nullptr);
- vector<vector<int>> dp(N,vector<int>(N,1));
- dp[0][0] = 0;
- int dr[] = {2,3}, dc[] = {1,2};
- int i=0, j=0, r=0;
- while(i<N && j<N) {
- dp[i][j] = 0;
- dp[j][i] = 0;
- i += dr[r];
- j += dc[r];
- r ^= 1;
- }
- int tt; cin >> tt;
- while (tt--) {
- int m, n, p, q;
- cin >> m >> n >> p >> q;
- cout << (dp[m-p][n-q] ? "Alice" : "Bob") << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement