結果

問題 No.2092 Conjugation
ユーザー titiatitia
提出日時 2022-10-07 21:27:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 19,504 KB
最終ジャッジ日時 2023-09-03 00:07:45
合計ジャッジ時間 2,770 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,872 KB
testcase_01 AC 14 ms
7,756 KB
testcase_02 AC 13 ms
7,964 KB
testcase_03 AC 14 ms
7,848 KB
testcase_04 AC 14 ms
7,952 KB
testcase_05 AC 13 ms
7,860 KB
testcase_06 AC 14 ms
7,884 KB
testcase_07 AC 75 ms
10,768 KB
testcase_08 AC 104 ms
15,460 KB
testcase_09 AC 84 ms
13,320 KB
testcase_10 AC 87 ms
13,752 KB
testcase_11 AC 90 ms
14,304 KB
testcase_12 AC 81 ms
13,040 KB
testcase_13 AC 74 ms
11,076 KB
testcase_14 AC 79 ms
10,880 KB
testcase_15 AC 83 ms
12,920 KB
testcase_16 AC 111 ms
18,188 KB
testcase_17 AC 123 ms
19,084 KB
testcase_18 AC 104 ms
19,504 KB
testcase_19 AC 40 ms
9,500 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

x=A[0]
ANS=[0]*x

for i in range(N):
    a=A[i]
    ANS[a-1]=i+1

for i in range(len(ANS)-1,-1,-1):
    if ANS[i]==0:
        ANS[i]=ANS[i+1]

print(*ANS)
0