# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147153 | jh05013 | Elder (COCI19_elder) | Cpython 3 | 26 ms | 3556 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
wand = input()
n = int(input())
owner = {wand}
for i in range(n):
w, l = input().split()
if l == wand:
wand = w
owner.add(wand)
print(wand)
print(len(owner))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |