# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1112858 | Pishka12 | 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 <bits/stdc++.h>
#define ll long long
#define f first
#define s second
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
ll n;
cin>>n;
ll lef = 0,rig = 0;
while (n--) {
ll a,b;
cin>>a>>b;
if (b == 1) {
lef+=a;
}
else {
rig+=a;
}
if (lef > rig) {
cout<<">"<<endl;
}
else if (rig > lef) {
cout<<"<"<<endl;
}
else {
cout<<"?"<<endl;
}
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |