답안 #171044

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
171044 2019-12-27T07:59:59 Z beksultan04 돌 무게 재기 (IZhO11_stones) C++14
0 / 100
2 ms 256 KB
#include <bits/stdc++.h>
using namespace std;
#define fr first
#define sc second
#define pb push_back
#define mk make_pair
#define OK puts("OK");
#define sz(s) (int)s.size()
#define pii pair<int,int>
#define all(s) s.begin(), s.end()
#define allr(s) s.rbegin(), s.rend()
#define rep(i,n) for (i=0;i<(n);++i)
#define rep1(i,n) for (i=1;i<=(n);++i)
#define ret return
#define nemeshay ios::sync_with_stdio(0),cin.tie(0);
const int N=1e6+12,INF=1e9+7;
main(){
    int a=0,b=0,i,n,type,x;
    cin>>n;
    rep(i,n){
        cin>>x>>type;
        if (type==1)a+=x;
        else b+=x;
        if (a>b){
            cout <<">\n";
        }
        else if (a<b){
            cout <<"<\n";
        }
        else cout <<"?\n";
    }
}

Compilation message

stones.cpp:17:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -