163742025-04-29 10:09:11algoproKéséspypy3Runtime error 45/50163ms65536 KiB
# UUID: 425d2640-a242-4f2a-8897-08ec9ddb36ad
N=int(input())
#A=[int(x) for x in input().split()]
A=list(map(int,input().split()))
S=set(A)

X = set()
for i in range(N-1,-1,-1):
    X.add(A[i])
    if len(X)==len(S):
        print(i+1)
        break
SubtaskSumTestVerdictTimeMemory
base45/50
1Accepted0/043ms19384 KiB
2Accepted0/052ms22760 KiB
3Accepted5/548ms21124 KiB
4Accepted5/543ms21160 KiB
5Accepted5/592ms45616 KiB
6Accepted5/5105ms45700 KiB
7Accepted4/4146ms64188 KiB
8Accepted4/4123ms64336 KiB
9Accepted4/4120ms62140 KiB
10Accepted4/4136ms60236 KiB
11Accepted4/4112ms57428 KiB
12Accepted2/2148ms65204 KiB
13Runtime error0/2138ms65536 KiB
14Runtime error0/1136ms65536 KiB
15Runtime error0/1163ms65536 KiB
16Runtime error0/1153ms65536 KiB
17Accepted1/1122ms64188 KiB
18Accepted1/1103ms52416 KiB
19Accepted1/1119ms51388 KiB