CSES - HIIT Open 2018 - Results
Submission details
Task:Coins
Sender:El Numero Uno
Submission time:2018-05-26 14:12:18 +0300
Language:Python3
Status:READY
Result:
Test results
testverdicttime
#1--details
#2--details
#3--details
#4--details
#5--details

Code

def f(s1, s2):
	x1 = len(s1)
	x2 = len(s2)
	l1 = min(s1) if x1 != 0 else 0
	l2 = min(s2) if x2 != 0 else 0
	b1 = max(s1) if x1 != 0 else 0
	b2 = max(s2) if x2 != 0 else 0
	
	if b1 < l2 and x1 <= x2:
		return "<"
	if b2 < l1 and x2 <= x1:
		return ">"
	return "?"

s1 = []
s2 = []

for i in range(int(input())):
	c, s = map(int, input().split())
	if s == 1:
		s1.append(c)
	else:
		s2.append(c)

	print(f(s1,s2))

Test details

Test 1

Verdict:

input
200000
175878 1
146174 1
4939 2
181388 1
...

correct output
>
>
>
>
>
...

user output
(empty)

Test 2

Verdict:

input
200000
1 2
2 1
3 2
4 1
...

correct output
<
>
<
>
<
...

user output
(empty)

Test 3

Verdict:

input
200000
1 1
2 1
3 1
4 1
...

correct output
>
>
>
>
>
...

user output
(empty)

Test 4

Verdict:

input
200000
1 1
2 1
3 1
4 1
...

correct output
>
>
>
>
>
...

user output
(empty)

Test 5

Verdict:

input
200000
188909 2
58944 1
26824 1
143263 2
...

correct output
<
<
?
<
<
...

user output
(empty)