Submission #1112859

#TimeUsernameProblemLanguageResultExecution timeMemory
1112859Pishka12Weighting stones (IZhO11_stones)C++14
0 / 100
1 ms336 KiB
#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; for (int i = 1;i<=n;i++) { 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 timeMemoryGrader output
Fetching results...