結果
問題 | No.1359 [Zelkova 3rd Tune] 四人セゾン |
ユーザー |
![]() |
提出日時 | 2021-01-22 21:36:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 560 ms / 2,000 ms |
コード長 | 399 bytes |
コンパイル時間 | 789 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 147,392 KB |
最終ジャッジ日時 | 2024-12-27 22:16:43 |
合計ジャッジ時間 | 34,431 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 75 |
ソースコード
n, k, m = map(int, input().split())p = list(map(int, input().split()))e = list(map(int, input().split()))a = list(map(int, input().split()))h = list(map(int, input().split()))p.sort()e.sort()a.sort()h.sort()diff = []for w, x, y, z in zip(p, e, a, h):diff.append(max(w, x, y, z) - min(w, x, y, z))ans = 0for i, d in enumerate(diff):ans += pow(d, k, m)ans %= mprint(ans)