結果

問題 No.1359 [Zelkova 3rd Tune] 四人セゾン
ユーザー lloyzlloyz
提出日時 2022-09-04 14:13:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 415 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 58,520 KB
最終ジャッジ日時 2024-04-29 14:28:53
合計ジャッジ時間 75,149 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 890 ms
34,228 KB
testcase_04 AC 822 ms
34,228 KB
testcase_05 AC 739 ms
34,196 KB
testcase_06 AC 748 ms
34,108 KB
testcase_07 AC 1,069 ms
44,208 KB
testcase_08 AC 1,098 ms
44,140 KB
testcase_09 AC 315 ms
19,564 KB
testcase_10 AC 306 ms
19,688 KB
testcase_11 AC 1,397 ms
51,980 KB
testcase_12 AC 1,410 ms
52,092 KB
testcase_13 AC 886 ms
37,708 KB
testcase_14 AC 894 ms
37,708 KB
testcase_15 AC 810 ms
33,752 KB
testcase_16 AC 812 ms
33,756 KB
testcase_17 AC 1,543 ms
54,120 KB
testcase_18 AC 1,562 ms
54,120 KB
testcase_19 AC 1,313 ms
48,772 KB
testcase_20 AC 1,319 ms
48,640 KB
testcase_21 AC 1,440 ms
51,308 KB
testcase_22 AC 1,429 ms
51,316 KB
testcase_23 AC 920 ms
39,432 KB
testcase_24 AC 931 ms
39,440 KB
testcase_25 AC 152 ms
15,104 KB
testcase_26 AC 155 ms
15,232 KB
testcase_27 AC 494 ms
25,416 KB
testcase_28 AC 499 ms
25,420 KB
testcase_29 AC 603 ms
28,488 KB
testcase_30 AC 604 ms
28,488 KB
testcase_31 AC 835 ms
34,848 KB
testcase_32 AC 846 ms
34,892 KB
testcase_33 AC 610 ms
28,344 KB
testcase_34 AC 633 ms
28,488 KB
testcase_35 AC 817 ms
34,220 KB
testcase_36 AC 828 ms
34,236 KB
testcase_37 AC 174 ms
15,316 KB
testcase_38 AC 174 ms
15,312 KB
testcase_39 AC 155 ms
14,592 KB
testcase_40 AC 156 ms
14,592 KB
testcase_41 AC 296 ms
19,092 KB
testcase_42 AC 278 ms
19,080 KB
testcase_43 AC 231 ms
17,532 KB
testcase_44 AC 1,491 ms
54,960 KB
testcase_45 AC 656 ms
29,012 KB
testcase_46 AC 236 ms
16,920 KB
testcase_47 AC 1,128 ms
41,356 KB
testcase_48 AC 993 ms
40,812 KB
testcase_49 AC 982 ms
41,388 KB
testcase_50 AC 764 ms
34,116 KB
testcase_51 AC 57 ms
11,776 KB
testcase_52 AC 1,358 ms
49,876 KB
testcase_53 AC 1,552 ms
56,848 KB
testcase_54 AC 1,651 ms
58,380 KB
testcase_55 AC 1,652 ms
58,384 KB
testcase_56 AC 1,642 ms
56,836 KB
testcase_57 AC 1,653 ms
56,852 KB
testcase_58 AC 1,629 ms
58,384 KB
testcase_59 AC 1,636 ms
58,368 KB
testcase_60 AC 1,557 ms
58,492 KB
testcase_61 AC 1,494 ms
58,384 KB
testcase_62 AC 1,593 ms
58,368 KB
testcase_63 AC 1,611 ms
56,960 KB
testcase_64 AC 1,641 ms
56,956 KB
testcase_65 AC 1,655 ms
58,388 KB
testcase_66 AC 1,609 ms
56,964 KB
testcase_67 TLE -
testcase_68 AC 1,779 ms
58,500 KB
testcase_69 AC 1,473 ms
56,828 KB
testcase_70 AC 1,554 ms
58,520 KB
testcase_71 AC 1,437 ms
58,520 KB
testcase_72 AC 1,647 ms
56,976 KB
testcase_73 AC 884 ms
58,500 KB
testcase_74 AC 881 ms
56,852 KB
testcase_75 AC 891 ms
56,904 KB
testcase_76 AC 909 ms
56,960 KB
testcase_77 AC 933 ms
56,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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()
ans = 0
for i in range(n):
    max_, min_ = max(P[i], E[i], A[i], H[i]), min(P[i], E[i], A[i], H[i])
    ans += pow(max_ - min_, k, m)
    ans %= m
print(ans)
0