# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
801867 | Trisanu_Das | Elder (COCI19_elder) | Cpython 3 | 14 ms | 2828 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... |