結果
問題 | No.1359 [Zelkova 3rd Tune] 四人セゾン |
ユーザー | McGregorsh |
提出日時 | 2022-07-16 21:48:58 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 579 ms / 2,000 ms |
コード長 | 1,721 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 167,176 KB |
最終ジャッジ日時 | 2024-06-28 22:15:01 |
合計ジャッジ時間 | 39,315 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 134 ms
89,728 KB |
testcase_01 | AC | 139 ms
89,600 KB |
testcase_02 | AC | 129 ms
89,472 KB |
testcase_03 | AC | 383 ms
124,928 KB |
testcase_04 | AC | 343 ms
124,672 KB |
testcase_05 | AC | 322 ms
124,160 KB |
testcase_06 | AC | 367 ms
123,904 KB |
testcase_07 | AC | 408 ms
142,644 KB |
testcase_08 | AC | 406 ms
142,560 KB |
testcase_09 | AC | 209 ms
106,496 KB |
testcase_10 | AC | 209 ms
106,624 KB |
testcase_11 | AC | 479 ms
156,500 KB |
testcase_12 | AC | 506 ms
156,888 KB |
testcase_13 | AC | 367 ms
145,436 KB |
testcase_14 | AC | 371 ms
145,408 KB |
testcase_15 | AC | 342 ms
124,416 KB |
testcase_16 | AC | 341 ms
124,228 KB |
testcase_17 | AC | 502 ms
165,556 KB |
testcase_18 | AC | 510 ms
166,072 KB |
testcase_19 | AC | 464 ms
146,688 KB |
testcase_20 | AC | 458 ms
146,180 KB |
testcase_21 | AC | 541 ms
155,036 KB |
testcase_22 | AC | 503 ms
155,188 KB |
testcase_23 | AC | 372 ms
142,736 KB |
testcase_24 | AC | 398 ms
142,848 KB |
testcase_25 | AC | 182 ms
93,184 KB |
testcase_26 | AC | 169 ms
93,312 KB |
testcase_27 | AC | 251 ms
114,452 KB |
testcase_28 | AC | 258 ms
114,176 KB |
testcase_29 | AC | 289 ms
118,700 KB |
testcase_30 | AC | 334 ms
118,528 KB |
testcase_31 | AC | 429 ms
128,052 KB |
testcase_32 | AC | 339 ms
127,872 KB |
testcase_33 | AC | 287 ms
116,736 KB |
testcase_34 | AC | 285 ms
117,248 KB |
testcase_35 | AC | 384 ms
124,800 KB |
testcase_36 | AC | 328 ms
124,672 KB |
testcase_37 | AC | 173 ms
94,720 KB |
testcase_38 | AC | 183 ms
94,524 KB |
testcase_39 | AC | 190 ms
91,520 KB |
testcase_40 | AC | 173 ms
91,392 KB |
testcase_41 | AC | 230 ms
106,496 KB |
testcase_42 | AC | 224 ms
106,560 KB |
testcase_43 | AC | 200 ms
100,992 KB |
testcase_44 | AC | 527 ms
167,176 KB |
testcase_45 | AC | 311 ms
117,504 KB |
testcase_46 | AC | 213 ms
98,944 KB |
testcase_47 | AC | 410 ms
145,024 KB |
testcase_48 | AC | 366 ms
140,916 KB |
testcase_49 | AC | 390 ms
144,644 KB |
testcase_50 | AC | 323 ms
124,160 KB |
testcase_51 | AC | 142 ms
90,368 KB |
testcase_52 | AC | 471 ms
152,420 KB |
testcase_53 | AC | 514 ms
159,968 KB |
testcase_54 | AC | 559 ms
160,104 KB |
testcase_55 | AC | 528 ms
159,840 KB |
testcase_56 | AC | 528 ms
158,944 KB |
testcase_57 | AC | 519 ms
158,836 KB |
testcase_58 | AC | 513 ms
159,204 KB |
testcase_59 | AC | 518 ms
158,820 KB |
testcase_60 | AC | 534 ms
159,464 KB |
testcase_61 | AC | 508 ms
159,452 KB |
testcase_62 | AC | 529 ms
159,340 KB |
testcase_63 | AC | 527 ms
159,332 KB |
testcase_64 | AC | 526 ms
159,472 KB |
testcase_65 | AC | 540 ms
159,460 KB |
testcase_66 | AC | 522 ms
159,600 KB |
testcase_67 | AC | 538 ms
159,204 KB |
testcase_68 | AC | 521 ms
159,500 KB |
testcase_69 | AC | 508 ms
159,472 KB |
testcase_70 | AC | 509 ms
159,460 KB |
testcase_71 | AC | 495 ms
159,720 KB |
testcase_72 | AC | 540 ms
159,600 KB |
testcase_73 | AC | 539 ms
159,716 KB |
testcase_74 | AC | 559 ms
159,464 KB |
testcase_75 | AC | 579 ms
159,328 KB |
testcase_76 | AC | 511 ms
159,472 KB |
testcase_77 | AC | 518 ms
159,216 KB |
ソースコード
import sys, re from fractions import Fraction from math import ceil, floor, sqrt, pi, factorial, gcd from copy import deepcopy from collections import Counter, deque, defaultdict from heapq import heapify, heappop, heappush from itertools import accumulate, product, combinations, combinations_with_replacement, permutations from bisect import bisect, bisect_left, bisect_right from functools import reduce from decimal import Decimal, getcontext def i_input(): return int(input()) def i_map(): return map(int, input().split()) def i_list(): return list(i_map()) def i_row(N): return [i_input() for _ in range(N)] def i_row_list(N): return [i_list() for _ in range(N)] def s_input(): return input() def s_map(): return input().split() def s_list(): return list(s_map()) def s_row(N): return [s_input for _ in range(N)] def s_row_str(N): return [s_list() for _ in range(N)] def s_row_list(N): return [list(s_input()) for _ in range(N)] def lcm(a, b): return a * b // gcd(a, b) def get_distance(x1, y1, x2, y2): d = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) return d def rotate(table): n_fild = [] for x in zip(*table[::-1]): n_fild.append(x) return n_fild sys.setrecursionlimit(10 ** 7) INF = float('inf') MOD = 10 ** 9 + 7 MOD2 = 998244353 ###関数コピーしたか?### def main(): n, k, m = i_map() p = i_list() e = i_list() a = i_list() h = i_list() p.sort() e.sort() a.sort() h.sort() ans = 0 for i in range(n): max_num = max(p[i], e[i], a[i], h[i]) min_num = min(p[i], e[i], a[i], h[i]) score = max_num - min_num ans += pow(score, k, m) ans %= m print(ans) if __name__ == '__main__': main()