163372025-04-28 17:47:42algoproKéséspypy3Runtime error 45/50171ms65536 KiB
# UUID: 251b0e54-acdb-4ffd-b7a0-b5c5ff09da60
n=int(input())
l=list(map(int,input().strip().split()))
s=set(l)
s2=set()
for i in range(n-1,-1,-1):
   s2.add(l[i])
   if len(s2) == len(s):
      print(i+1)
      break
SubtaskSumTestVerdictTimeMemory
base45/50
1Accepted0/043ms19628 KiB
2Accepted0/052ms22680 KiB
3Accepted5/545ms21064 KiB
4Accepted5/548ms21144 KiB
5Accepted5/592ms45492 KiB
6Accepted5/592ms45672 KiB
7Accepted4/4150ms64296 KiB
8Accepted4/4148ms64188 KiB
9Accepted4/4119ms62096 KiB
10Accepted4/4116ms60340 KiB
11Accepted4/4133ms57500 KiB
12Accepted2/2148ms65152 KiB
13Runtime error0/2140ms65536 KiB
14Runtime error0/1140ms65536 KiB
15Runtime error0/1171ms65536 KiB
16Runtime error0/1157ms65536 KiB
17Accepted1/1126ms64288 KiB
18Accepted1/1123ms52404 KiB
19Accepted1/1101ms51488 KiB