#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#define intt long long
#define pb push_back
#define endl "\n"
#define ALL(x) x.begin(), x.end()
void solve() {
int n;
cin >> n;
intt sol = 0, sag = 0;
for(int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
if(b == 2) sag += a;
else sol += a;
if(sol == sag) {
cout << "?" << endl;
} else if(sol < sag) {
cout << "<" << endl;
} else {
cout << ">" << endl;
}
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
intt tst = 1;
// cin >> tst
while (tst--) {
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |