結果

問題 No.1687 What the Heck?
ユーザー Mik10Mik10
提出日時 2021-10-06 00:48:01
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 244 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 71,524 KB
最終ジャッジ日時 2023-09-30 08:35:51
合計ジャッジ時間 4,593 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,312 KB
testcase_01 AC 70 ms
71,524 KB
testcase_02 AC 69 ms
71,300 KB
testcase_03 AC 70 ms
71,060 KB
testcase_04 AC 69 ms
71,332 KB
testcase_05 AC 68 ms
71,500 KB
testcase_06 AC 68 ms
71,348 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
suzu = list(map(int, input().split()))
ans = 0
draw = 0
for i in range(n, 1, -1):
    smax = suzu.index(i) + 1
    pt = sum([i+1 for i in range(n)]) - smax*2 - draw
    ans = pt if ans < pt else ans
    draw += smax
print (ans)
0