結果

問題 No.1359 [Zelkova 3rd Tune] 四人セゾン
ユーザー yuusanlondonyuusanlondon
提出日時 2021-01-22 21:26:31
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 526 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 870 ms
コンパイル使用メモリ 86,824 KB
実行使用メモリ 152,300 KB
最終ジャッジ日時 2023-08-27 17:20:17
合計ジャッジ時間 36,117 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,268 KB
testcase_01 AC 63 ms
70,820 KB
testcase_02 AC 64 ms
71,052 KB
testcase_03 AC 364 ms
122,616 KB
testcase_04 AC 340 ms
123,484 KB
testcase_05 AC 316 ms
122,964 KB
testcase_06 AC 316 ms
122,652 KB
testcase_07 AC 397 ms
125,776 KB
testcase_08 AC 395 ms
125,908 KB
testcase_09 AC 176 ms
89,748 KB
testcase_10 AC 166 ms
89,964 KB
testcase_11 AC 488 ms
146,464 KB
testcase_12 AC 500 ms
146,632 KB
testcase_13 AC 349 ms
123,060 KB
testcase_14 AC 348 ms
122,956 KB
testcase_15 AC 348 ms
122,832 KB
testcase_16 AC 345 ms
122,856 KB
testcase_17 AC 515 ms
148,236 KB
testcase_18 AC 526 ms
148,320 KB
testcase_19 AC 465 ms
140,080 KB
testcase_20 AC 456 ms
139,700 KB
testcase_21 AC 488 ms
151,848 KB
testcase_22 AC 493 ms
152,300 KB
testcase_23 AC 329 ms
119,516 KB
testcase_24 AC 336 ms
119,456 KB
testcase_25 AC 142 ms
81,440 KB
testcase_26 AC 136 ms
81,156 KB
testcase_27 AC 220 ms
97,000 KB
testcase_28 AC 216 ms
96,716 KB
testcase_29 AC 266 ms
112,300 KB
testcase_30 AC 267 ms
112,016 KB
testcase_31 AC 335 ms
126,672 KB
testcase_32 AC 340 ms
126,980 KB
testcase_33 AC 270 ms
111,348 KB
testcase_34 AC 271 ms
111,556 KB
testcase_35 AC 327 ms
123,168 KB
testcase_36 AC 317 ms
123,292 KB
testcase_37 AC 135 ms
82,204 KB
testcase_38 AC 132 ms
82,516 KB
testcase_39 AC 137 ms
79,692 KB
testcase_40 AC 140 ms
79,604 KB
testcase_41 AC 195 ms
89,880 KB
testcase_42 AC 193 ms
89,852 KB
testcase_43 AC 167 ms
86,496 KB
testcase_44 AC 510 ms
141,472 KB
testcase_45 AC 313 ms
112,308 KB
testcase_46 AC 177 ms
85,008 KB
testcase_47 AC 387 ms
125,096 KB
testcase_48 AC 346 ms
121,016 KB
testcase_49 AC 374 ms
124,384 KB
testcase_50 AC 310 ms
122,480 KB
testcase_51 AC 96 ms
77,420 KB
testcase_52 AC 446 ms
147,064 KB
testcase_53 AC 496 ms
138,236 KB
testcase_54 AC 514 ms
138,068 KB
testcase_55 AC 506 ms
137,764 KB
testcase_56 AC 522 ms
137,284 KB
testcase_57 AC 507 ms
138,420 KB
testcase_58 AC 482 ms
136,932 KB
testcase_59 AC 501 ms
137,960 KB
testcase_60 AC 497 ms
137,760 KB
testcase_61 AC 480 ms
136,960 KB
testcase_62 AC 508 ms
138,324 KB
testcase_63 AC 517 ms
139,304 KB
testcase_64 AC 497 ms
137,780 KB
testcase_65 AC 505 ms
138,324 KB
testcase_66 AC 476 ms
138,844 KB
testcase_67 AC 497 ms
138,068 KB
testcase_68 AC 480 ms
137,224 KB
testcase_69 AC 483 ms
138,308 KB
testcase_70 AC 490 ms
138,208 KB
testcase_71 AC 467 ms
137,552 KB
testcase_72 AC 523 ms
138,080 KB
testcase_73 AC 498 ms
138,072 KB
testcase_74 AC 509 ms
137,888 KB
testcase_75 AC 490 ms
137,860 KB
testcase_76 AC 491 ms
138,036 KB
testcase_77 AC 484 ms
138,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,m=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
d=list(map(int,input().split()))
a.sort()
b.sort()
c.sort()
d.sort()
MOD=m
ans=0
for i in range(n):
  ans=(ans+pow(max(a[i],b[i],c[i],d[i])-min(a[i],b[i],c[i],d[i]),k,MOD))%MOD
print(ans)
0