結果

問題 No.1359 [Zelkova 3rd Tune] 四人セゾン
ユーザー あかしあみどりあかしあみどり
提出日時 2023-02-15 21:43:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 523 ms / 2,000 ms
コード長 568 bytes
コンパイル時間 1,831 ms
コンパイル使用メモリ 86,840 KB
実行使用メモリ 152,720 KB
最終ジャッジ日時 2023-09-25 05:49:57
合計ジャッジ時間 43,709 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,464 KB
testcase_01 AC 69 ms
71,352 KB
testcase_02 AC 67 ms
71,472 KB
testcase_03 AC 306 ms
123,492 KB
testcase_04 AC 305 ms
123,348 KB
testcase_05 AC 291 ms
123,088 KB
testcase_06 AC 292 ms
123,176 KB
testcase_07 AC 375 ms
125,940 KB
testcase_08 AC 377 ms
125,964 KB
testcase_09 AC 159 ms
90,232 KB
testcase_10 AC 158 ms
89,920 KB
testcase_11 AC 469 ms
146,212 KB
testcase_12 AC 521 ms
146,624 KB
testcase_13 AC 330 ms
123,272 KB
testcase_14 AC 332 ms
123,296 KB
testcase_15 AC 309 ms
123,024 KB
testcase_16 AC 307 ms
123,180 KB
testcase_17 AC 507 ms
148,496 KB
testcase_18 AC 504 ms
148,832 KB
testcase_19 AC 443 ms
140,016 KB
testcase_20 AC 443 ms
139,900 KB
testcase_21 AC 481 ms
152,496 KB
testcase_22 AC 476 ms
152,720 KB
testcase_23 AC 333 ms
119,576 KB
testcase_24 AC 331 ms
119,768 KB
testcase_25 AC 115 ms
81,272 KB
testcase_26 AC 114 ms
81,356 KB
testcase_27 AC 208 ms
96,960 KB
testcase_28 AC 212 ms
96,848 KB
testcase_29 AC 249 ms
113,032 KB
testcase_30 AC 250 ms
112,616 KB
testcase_31 AC 313 ms
127,048 KB
testcase_32 AC 309 ms
127,172 KB
testcase_33 AC 248 ms
110,712 KB
testcase_34 AC 248 ms
110,652 KB
testcase_35 AC 304 ms
123,328 KB
testcase_36 AC 303 ms
123,360 KB
testcase_37 AC 122 ms
82,964 KB
testcase_38 AC 120 ms
82,912 KB
testcase_39 AC 111 ms
79,312 KB
testcase_40 AC 112 ms
79,560 KB
testcase_41 AC 150 ms
89,760 KB
testcase_42 AC 151 ms
89,732 KB
testcase_43 AC 136 ms
86,428 KB
testcase_44 AC 485 ms
141,348 KB
testcase_45 AC 257 ms
112,700 KB
testcase_46 AC 136 ms
85,300 KB
testcase_47 AC 377 ms
125,464 KB
testcase_48 AC 340 ms
120,816 KB
testcase_49 AC 355 ms
124,596 KB
testcase_50 AC 304 ms
123,176 KB
testcase_51 AC 88 ms
76,568 KB
testcase_52 AC 451 ms
147,676 KB
testcase_53 AC 487 ms
138,148 KB
testcase_54 AC 507 ms
137,684 KB
testcase_55 AC 508 ms
137,592 KB
testcase_56 AC 502 ms
137,316 KB
testcase_57 AC 513 ms
138,616 KB
testcase_58 AC 505 ms
137,280 KB
testcase_59 AC 501 ms
137,572 KB
testcase_60 AC 494 ms
137,768 KB
testcase_61 AC 483 ms
137,236 KB
testcase_62 AC 504 ms
138,072 KB
testcase_63 AC 505 ms
138,928 KB
testcase_64 AC 510 ms
137,668 KB
testcase_65 AC 505 ms
138,384 KB
testcase_66 AC 497 ms
138,628 KB
testcase_67 AC 523 ms
137,580 KB
testcase_68 AC 500 ms
137,316 KB
testcase_69 AC 467 ms
137,296 KB
testcase_70 AC 475 ms
137,528 KB
testcase_71 AC 472 ms
137,056 KB
testcase_72 AC 513 ms
137,632 KB
testcase_73 AC 510 ms
138,132 KB
testcase_74 AC 503 ms
137,416 KB
testcase_75 AC 506 ms
137,400 KB
testcase_76 AC 499 ms
138,192 KB
testcase_77 AC 506 ms
138,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def oi(): return int(input())
def os(): return input()
def mi(): return list(map(int, input().split()))

# import sys
# input = sys.stdin.readline
# import sys
# sys.setrecursionlimit(10**8)
# import pypyjit
# pypyjit.set_param('max_unroll_recursion=-1')
input_count = 0

input_count = 0
N,K,M = mi()

P = mi()
E = mi()
A = mi()
H = mi()
P.sort()
E.sort()
A.sort()
H.sort()
sums = 0
for _ in range(N):
    p = P.pop()
    e = E.pop()
    a = A.pop()
    h = H.pop()
    lists = [p,e,a,h]
    lists.sort()
    sums = (sums + pow(lists[-1]-lists[0], K,M) )%M
print(sums)
0