# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
161449 | boolodifjenula | Elder (COCI19_elder) | Cpython 3 | 27 ms | 3428 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.
ima=input()
N=int(input())
k=1
L=[ima]
for i in range (N):
Z1,Z2=map(str,input().split())
if Z2==ima:
ima=Z1
if bool(Z1 in L)==0:
k+=1
L+=[Z1]
print(ima)
print(k)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |