#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <functional>
#include <vector>
#include <numeric>
#include <deque>
#include <utility>
#include <bitset>
#include <iostream>
using namespace std;
typedef long long lint;
typedef long double llf;
typedef pair<int, int> pi;
bool low(vector<int> &v1, vector<int> &v2){
int p = 0;
if(v1.size() > v2.size()) return 0;
return *max_element(v1.begin(), v1.end()) < *max_element(v2.begin(), v2.end());
for(int i=0; i<v1.size(); i++){
if(v1[i] > v2[v2.size() - v1.size() + i]){
return 0;
}
}
return 1;
}
vector<int> v[3];
int main(){
int q;
scanf("%d",&q);
v[1].push_back(0);
v[2].push_back(0);
while(q--){
int a, b;
scanf("%d %d",&b,&a);
v[a].push_back(b);
sort(v[a].begin(),v[a].end());
if(low(v[1], v[2])){
puts("<");
}
else if(low(v[2], v[1])){
puts(">");
}
else puts("?");
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 20th words differ - expected: '?', found: '>' |
2 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 6th words differ - expected: '?', found: '>' |
3 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 8th words differ - expected: '?', found: '>' |
4 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 7th words differ - expected: '?', found: '<' |
5 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 14th words differ - expected: '?', found: '>' |
6 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct - 36th words differ - expected: '?', found: '<' |
7 |
Incorrect |
7 ms |
1720 KB |
Output isn't correct - 17th words differ - expected: '?', found: '<' |
8 |
Incorrect |
13 ms |
1720 KB |
Output isn't correct - 10th words differ - expected: '?', found: '<' |
9 |
Incorrect |
7 ms |
1720 KB |
Output isn't correct - 4th words differ - expected: '?', found: '>' |
10 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
11 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
12 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
13 |
Execution timed out |
1000 ms |
1872 KB |
Program timed out |
14 |
Execution timed out |
1000 ms |
1872 KB |
Program timed out |
15 |
Execution timed out |
1000 ms |
1892 KB |
Program timed out |
16 |
Execution timed out |
1000 ms |
1872 KB |
Program timed out |
17 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
18 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
19 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
20 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
21 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
22 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
23 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
24 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |
25 |
Execution timed out |
1000 ms |
1720 KB |
Program timed out |