結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-04-29 23:50:12 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 384 bytes |
| 記録 | |
| コンパイル時間 | 196 ms |
| コンパイル使用メモリ | 84,992 KB |
| 実行使用メモリ | 124,928 KB |
| 最終ジャッジ日時 | 2026-04-20 13:12:42 |
| 合計ジャッジ時間 | 3,651 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 31 |
ソースコード
def solve():
al, tl = [], []
n = int(input())
for j in input().split():
i = int(j)
al.append(i)
tl.append(i)
ad = dict(zip(al, [i for i in range(n)]))
tl = dict(zip(sorted(tl), [i for i in range(n)]))
res = 0
for ak in ad.keys():
res = max(res, abs(ad[ak] - tl[ak]))
print(res)
if __name__=="__main__":
solve()