結果
問題 | No.365 ジェンガソート |
ユーザー | 👑 yumechi |
提出日時 | 2016-04-29 23:50:12 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 82,088 KB |
実行使用メモリ | 115,804 KB |
最終ジャッジ日時 | 2024-04-15 06:11:23 |
合計ジャッジ時間 | 4,259 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
52,196 KB |
testcase_01 | AC | 35 ms
53,008 KB |
testcase_02 | AC | 34 ms
52,476 KB |
testcase_03 | AC | 34 ms
52,848 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 37 ms
52,660 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 35 ms
52,368 KB |
testcase_11 | WA | - |
testcase_12 | AC | 35 ms
52,248 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | AC | 111 ms
114,920 KB |
testcase_37 | AC | 113 ms
114,908 KB |
testcase_38 | WA | - |
testcase_39 | AC | 114 ms
115,804 KB |
testcase_40 | WA | - |
ソースコード
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()