scientific_comp_projects/CODE/[python]kattis/trivial/forcedchoice.py
2021-10-29 15:16:40 +02:00

11 lines
229 B
Python

numbers = input()
n, p, s = numbers.split(' ')
for i in range(int(s)):
intro = input()
_,*b = intro.split(' ')
is_it = map(lambda x: x==p, b)
if any(is_it):
print('KEEP')
else:
print('REMOVE')