Submission #17838

# Submission time Handle Problem Language Result Execution time Memory
17838 2016-01-12T12:12:16 Z Erzhann Energetic turtle (IZhO11_turtle) C++14
0 / 100
135 ms 15196 KB
/*
  /\     /\
  | ).|.( |
  |  >-<  |
  =========
It's Adilkhan99 miaaaaaau      
*/
#include<bits/stdc++.h>

#define ll long long
#define pb push_back
#define endl "\n"
#define foreach(it, S) for(__typeof (S.begin()) it = S.begin(); it != S.end(); it++)
#define mp make_pair
#define f first
#define s second 
#define name ""
#define _ ios_base::sync_with_stdio(false);cin.tie(0);

using namespace std;
                                            
const int MaxN = int (2e5) + 256;
const int INF = int(1e9);  
const int mod = (int)(1e9) + 7;
int n, a[MaxN], m, t;
multiset<int> s, S;

int main () { _

	cin >> n;
	for(int i = 1; i <= n; i++){
		int x, y; cin >> x >> y;
		if(y == 2)
			S.insert(-x);		
		else s.insert(-x);
		auto I = s.begin();
		auto J = S.begin();
		bool ok = 0, ok1 = 0;
		while(I != s.end() && J != S.end()){
			if(ok && ok1){
				break;
			}
			if(-(*I) > -(*J))
				ok = 1;
			if(-(*I) < -(*J))
				ok1 = 1;
			I++;
			J++;
		}
		if(I == s.end() && J != S.end())
			ok1 = 1;
		if(J == S.end() && I != s.end())
			ok = 1;
		if(ok && ok1)
			cout << "?";
		else if(ok)
			cout << ">";
		else cout << "<";
		cout << endl;								
	}	              	
return 0;
}                   									
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 348 KB Output isn't correct
4 Incorrect 2 ms 276 KB Output isn't correct
5 Incorrect 2 ms 272 KB Output isn't correct
6 Incorrect 2 ms 376 KB Output isn't correct
7 Incorrect 2 ms 292 KB Output isn't correct
8 Incorrect 2 ms 376 KB Output isn't correct
9 Incorrect 3 ms 632 KB Output isn't correct
10 Incorrect 5 ms 760 KB Output isn't correct
11 Incorrect 41 ms 5232 KB Output isn't correct
12 Incorrect 130 ms 15012 KB Output isn't correct
13 Incorrect 81 ms 10104 KB Output isn't correct
14 Incorrect 39 ms 5240 KB Output isn't correct
15 Incorrect 41 ms 5224 KB Output isn't correct
16 Incorrect 117 ms 14540 KB Output isn't correct
17 Incorrect 124 ms 14968 KB Output isn't correct
18 Incorrect 135 ms 15096 KB Output isn't correct
19 Incorrect 126 ms 15196 KB Output isn't correct
20 Incorrect 132 ms 15068 KB Output isn't correct