結果

問題 No.318 学学学学学
ユーザー pluto77pluto77
提出日時 2018-02-07 11:07:01
言語 PyPy2
(7.3.15)
結果
TLE  
実行時間 -
コード長 394 bytes
コンパイル時間 756 ms
コンパイル使用メモリ 77,664 KB
実行使用メモリ 133,520 KB
最終ジャッジ日時 2023-10-12 11:10:21
合計ジャッジ時間 6,618 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
80,324 KB
testcase_01 AC 124 ms
84,028 KB
testcase_02 AC 140 ms
89,168 KB
testcase_03 AC 118 ms
82,596 KB
testcase_04 AC 131 ms
85,136 KB
testcase_05 AC 374 ms
133,520 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki318

n=int(raw_input())
a=map(int,raw_input().split())
b=list(a)
b.reverse()
r={}
l={}
for i,a in enumerate(a):
 r[a]=i
r=sorted(r.items(),key=lambda x:-x[0])
for i,b in enumerate(b):
 l[b]=n-i-1
l=sorted(l.items(),key=lambda x:-x[0])
res=[0]*n
for i in xrange(len(r)):
 for j in xrange(l[i][1],r[i][1]+1):
  if res[j]==0:
   res[j]=l[i][0]
for i in xrange(len(res)):
 print res[i],
print
0