# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1116985 | kirakosyan | Weighting stones (IZhO11_stones) | C++17 | 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<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<random>
#include<cmath>
#include<stack>
#include<map>
#include <iomanip>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
using ull = unsigned long long;
ll mod = 1e9 + 7;
ll pv(ll a, ll b) {
if (b == 0)return 1;
ll res = (pv(a, b / 2));
if (b % 2) {
return (((res * res) % mod) * (a % mod)) % mod;
}
else {
return (res * res) % mod;
}
}
void solve() {
ll n; cin >> n;
ll sum = 0, sum1 = 0;
for (int i = 0; i < n; i++) {
int r, s; cin >> r >> s;
if (s == 1) {
sum += r;
}
else sum1 += r;
if (sum > sum1) {
cout << ">" << endl;
}
else if (sum < sum1) {
cout << "<" << endl;
}
else cout << "?" << endl;
}
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL); cin.tie(nullptr);
ll _ = 1;
//cin >> _;
while (_--)
{
solve();
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |