# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1109698 | Anar | Weighting stones (IZhO11_stones) | C++14 | 1 ms | 336 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <array>
#include <map>
#include <iterator>
using namespace std;
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define fastio ios_base::sync_with_stdio(false); cin.tie(nullptr);
typedef pair<int,int> pii;
typedef vector<ll> vi;
typedef vector<pii> vii;
typedef vector<vi> vvi;
typedef vector<bool> vb;
typedef vector<vb> vvb;
int n;
int l, r;
void process() {
cin >> n;
for (int i = 0; i < n; i++) {
int w, s;
cin >> w >> s;
if (s == 1) l += w;
else r += w;
if (l < r) cout << '>' << '\n';
else if (l > r) cout << '<' << '\n';
else cout << '?' << '\n';
}
}
signed main() {
fastio;
process();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |