#line 1 "/home/kinugoshi/Kyopro/kinugoshi_Library/kinugoshi/overwrite/overwrite_io.hpp" #include #include #include #include namespace std { template * = nullptr> ostream &operator<<(ostream &os, const atcoder::static_modint &v) { os << v.val(); return os; } template ostream &operator<<(ostream &os, const pair &v) { os << v.first << " " << v.second; return os; } template istream &operator>>(istream &is, pair &v) { is >> v.first >> v.second; return is; } template ostream &operator<<(ostream &os, const vector &v) { for(int i = 0; i < (int)v.size(); i++) { os << v[i] << (i != (int)v.size() - 1 ? " " : ""); } return os; } template istream &operator>>(istream &is, vector &v) { for(T &in : v) is >> in; return is; } template ostream &operator<<(ostream &os, const vector> &v) { for(int i = 0; i < (int)v.size(); i++) { for(int j = 0; j < (int)v[i].size(); j++) { os << v[i][j] << (j != (int)v.size() - 1 ? " " : "\n"); } } return os; } } // namespace std #line 2 "/home/kinugoshi/Kyopro/kinugoshi_Library/kinugoshi/overwrite/template.hpp" #include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define rep(a, b) for(long long a = 0; a < (long long)(b); a++) #define repi(a, b) for(int a = 0; a < (int)(b); a++) #define repr(a, b) for(long long a = (long long)(b)-1; a >= 0; a--) #define repo(a, b) for(int a = (int)(b)-1; a >= 0; a--) template inline void chmin(T &a, T b) { a = min(a, b); } template inline void chmax(T &a, T b) { a = max(a, b); } inline void YesNo(bool ret) { if(ret) cout << "Yes" << endl; else cout << "No" << endl; } #line 2 "main.cpp" using mint = modint998244353; // using namespace kinugoshi; // using namespace boost::multiprecision; int op(int a, int b) { return min(a, b); } int e() { return 2147483647; } int main() { int N, M; cin >> N >> M; while(N--) { int A, B; cin >> A >> B; cout << ((A < B) ? 0 : 1) << endl; } }