| Task: | Coins |
| Sender: | Tefyn virallinen maajoukkue |
| Submission time: | 2018-05-26 12:19:46 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.28 s | details |
| #2 | WRONG ANSWER | 0.34 s | details |
| #3 | WRONG ANSWER | 0.27 s | details |
| #4 | ACCEPTED | 0.29 s | details |
| #5 | WRONG ANSWER | 0.31 s | details |
Code
#include <bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
int mi1 = 1000000000, mi2 = 1000000000;
int ma1 = 0, ma2 = 0;
int s1 = 0, s2 = 0;
for(int i = 0; i < n; ++i){
int c, s; cin >> c >> s;
if(s == 1){
s1++;
mi1 = min(mi1, c);
ma1 = max(ma1, c);
}
else{
s2++;
mi2 = min(mi2, c);
ma2 = max(ma2, c);
}
if(s1 >= s2 && mi1 >= ma2)
cout << ">" << endl;
else if(s2 >= s1 && mi2 >= ma1)
cout << "<" << endl;
else
cout << "?" << endl;
}
return 0;
}Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 200000 175878 1 146174 1 4939 2 181388 1 ... |
| correct output |
|---|
| > > > > > ... |
| user output |
|---|
| > > > > > ... |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 200000 1 2 2 1 3 2 4 1 ... |
| correct output |
|---|
| < > < > < ... |
| user output |
|---|
| < > ? ? ? ... |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 200000 1 1 2 1 3 1 4 1 ... |
| correct output |
|---|
| > > > > > ... |
| user output |
|---|
| > > > > > ... |
Test 4
Verdict: ACCEPTED
| input |
|---|
| 200000 1 1 2 1 3 1 4 1 ... |
| correct output |
|---|
| > > > > > ... |
| user output |
|---|
| > > > > > ... |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 200000 188909 2 58944 1 26824 1 143263 2 ... |
| correct output |
|---|
| < < ? < < ... |
| user output |
|---|
| < < ? < < ... |
