Submission #59386705


Source Code Expand

N=int(input())

A=list(map(int, input().split()))

B=[-1]
maxval=-1
for i in range(1,N,1):
    #print(i)
    for j in range(0,i):
        #print(i,j)
        #print("A[i]:",A[i],"A[j]:",A[j])
        if A[i]== A[j]:
            maxval=j+1
    B.append(maxval)
    maxval=-1
  
print(' '.join(map(str, B)))
        

Submission Info

Submission Time
Task C - Repeating
User gunmapyon
Language Python (CPython 3.11.4)
Score 0
Code Size 333 Byte
Status TLE
Exec Time 2208 ms
Memory 31400 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 3
TLE × 25
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 02_handmade_01.txt, 02_handmade_02.txt, 02_handmade_03.txt, 02_handmade_04.txt, 02_handmade_05.txt, 02_handmade_06.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 9 ms 8488 KiB
00_sample_02.txt AC 9 ms 8592 KiB
01_random_01.txt TLE 2208 ms 30520 KiB
01_random_02.txt TLE 2208 ms 30576 KiB
01_random_03.txt TLE 2208 ms 30484 KiB
01_random_04.txt TLE 2208 ms 30596 KiB
01_random_05.txt TLE 2208 ms 31400 KiB
01_random_06.txt TLE 2208 ms 30520 KiB
01_random_07.txt TLE 2208 ms 30512 KiB
01_random_08.txt TLE 2208 ms 31368 KiB
01_random_09.txt TLE 2208 ms 30584 KiB
01_random_10.txt TLE 2208 ms 30616 KiB
01_random_11.txt TLE 2208 ms 15036 KiB
01_random_12.txt TLE 2208 ms 30580 KiB
01_random_13.txt TLE 2208 ms 24276 KiB
01_random_14.txt TLE 2208 ms 31312 KiB
01_random_15.txt TLE 2208 ms 16988 KiB
01_random_16.txt TLE 2208 ms 30540 KiB
01_random_17.txt TLE 2208 ms 21460 KiB
01_random_18.txt TLE 2208 ms 30584 KiB
01_random_19.txt TLE 2208 ms 10656 KiB
01_random_20.txt TLE 2208 ms 30468 KiB
02_handmade_01.txt AC 9 ms 8460 KiB
02_handmade_02.txt TLE 2208 ms 30492 KiB
02_handmade_03.txt TLE 2208 ms 30540 KiB
02_handmade_04.txt TLE 2208 ms 30568 KiB
02_handmade_05.txt TLE 2208 ms 30620 KiB
02_handmade_06.txt TLE 2208 ms 30588 KiB