Submission #1109699

#TimeUsernameProblemLanguageResultExecution timeMemory
1109699AnarWeighting stones (IZhO11_stones)C++14
0 / 100
1 ms336 KiB
#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 == 2) 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 timeMemoryGrader output
Fetching results...