| Task: | Coins |
| Sender: | El Numero Uno |
| Submission time: | 2018-05-26 14:29:43 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.34 s | details |
| #2 | WRONG ANSWER | 0.31 s | details |
| #3 | WRONG ANSWER | 0.32 s | details |
| #4 | ACCEPTED | 0.29 s | details |
| #5 | WRONG ANSWER | 0.30 s | details |
Code
#include <iostream>
#include "stdio.h"
using namespace std;
int main()
{
int N, c, s;
long s1[3] {0,0,0};
long s2[3] {0,0,0};
cin >> N;
for (int _ = 0; _ < N; _++) {
cin >> c >> s;
if (s == 1) {
if (s1[0]==0||c < s1[1]) s1[1] = c;
if (c > s1[2]) s1[2] = c;
s1[0] += 1;
} else {
if (s2[0]==0||c < s2[1]) s2[1] = c;
if (c > s2[2]) s2[2] = c;
s2[0] += 1;
}
if (s1[2] < s2[1] && s1[0] <= s2[0]){
printf("<\n");
} else if (s2[2] < s1[1] && s1[0] <= s1[0]) {
printf(">\n");
} else {
printf("?\n");
}
}
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 |
|---|
| < < ? < < ... |
