1982021-02-06 12:40:21Molnár AttilaKéséspython3Accepted 50/50208ms81068 KiB
from sys import stdin, stdout
def main():
    N = int(stdin.readline())
    E = list(map(int,stdin.readline().split()))

    h = set()

    itt = N
    i = N-1
    while (0<=i):
        if E[i] not in h:
            h.add(E[i])
            itt=i
        i-=1
    stdout.write(str(itt+1))

main()
SubtaskSumTestVerdictTimeMemory
base50/50
1Accepted0/039ms13268 KiB
2Accepted0/043ms17984 KiB
3Accepted5/529ms13420 KiB
4Accepted5/528ms13508 KiB
5Accepted5/5143ms56256 KiB
6Accepted5/5118ms57176 KiB
7Accepted4/4163ms60040 KiB
8Accepted4/4165ms61484 KiB
9Accepted4/4163ms62624 KiB
10Accepted4/4155ms64016 KiB
11Accepted4/4187ms65100 KiB
12Accepted2/2188ms68000 KiB
13Accepted2/2181ms69968 KiB
14Accepted1/1208ms71412 KiB
15Accepted1/1178ms73284 KiB
16Accepted1/1162ms75260 KiB
17Accepted1/1159ms77256 KiB
18Accepted1/1123ms79212 KiB
19Accepted1/1131ms81068 KiB