# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
801863 | Trisanu_Das | Elder (COCI19_elder) | Pypy 3 | 34 ms | 18240 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.
w = input()
n = int(input())
o = {w}
for i in range(n):
ww, l = input().split()
if l == w:
w = ww
o.add(w)
print(w)
print(len(o))
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |