# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
89917 | Scayre | Weighting stones (IZhO11_stones) | C++14 | 2 ms | 404 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.
/// In the name of GOD
/// I love my MOTHER
/// Only GOLD
//#include <bits/stdc++.h>
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <unordered_set>
#define sz(s) (ll)(s.size())
#define all(x) (x.begin(), x.end())
#define pb push_back
#define pf push_front
#define F first
#define S second
#define ort1 exit(0);
#define nl endl
#define db double
#define ioi exit(0);
#define TL clock() / (double)CLOCKS_PER_SEC
#define NFS ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int mod = 1e9 + 7;
const ll INF = 1e12 + 1;
const int N = 2e5 + 9;
int n;
ll l,r;
int main(){
//freopen("stones.in","r",stdin);
//freopen("stones.out","w",stdout);
cin >> n;
for(int i=1;i<=n;i++){
int x,y;
cin >> x >> y;
if(y==1){
l+=x;
}
else r+=x;
if(l>r){
if(i==n){
cout << '>';
break;
}
cout << '>' << endl;
}
if(l<r){
if(i==n){
cout << '<';
break;
}
cout << '<' << endl;
}
if(l==r){
if(i==n){
cout << '?';
break;
}
cout << '?' << endl;
}
}
ioi
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |