# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
673600 | smartmonky | 돌 무게 재기 (IZhO11_stones) | C++14 | 1 ms | 212 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
//#define int long long
using namespace std;
void fp(string name){freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout);}
const int N = 501 * 500;
int cnt[3], mx[3],mn[3];
int chotam[N];
main(){
//fp("stones");
int q;
cin >> q;
mn[1] = 1e9;
mn[2] = 1e9;
while(q--){
int r, s;
cin >> r >> s;
cnt[s]++;
mx[s] = max(mx[s], r);
mn[s] = min(mn[s], r);
if((cnt[1] == cnt[2] && mn[1] > mn[2] && mx[1] > mx[2]) || mn[2] == 1e9 || (cnt[1] > cnt[2] && mx[1] > mx[2])){
cout <<">" << endl;
continue;
}
if((cnt[1] == cnt[2] && mn[1] < mn[2] && mx[1] < mx[2]) || mn[1] == 1e9 || (cnt[1] < cnt[2] && mx[1] < mx[2])){
cout <<"<" << endl;
continue;
}
cout <<"?" << endl;
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |