답안 #89917

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
89917 2018-12-19T04:56:05 Z Scayre 돌 무게 재기 (IZhO11_stones) C++14
0 / 100
2 ms 404 KB
/// 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
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 404 KB Output isn't correct
2 Halted 0 ms 0 KB -