結果
問題 |
No.1687 What the Heck?
|
ユーザー |
![]() |
提出日時 | 2021-10-06 00:48:01 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 244 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 258,840 KB |
最終ジャッジ日時 | 2024-07-23 02:38:44 |
合計ジャッジ時間 | 4,105 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 5 TLE * 1 -- * 12 |
ソースコード
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)