結果

問題 No.1726 [Cherry 3rd Tune B] ジャマイカビアポン
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-10-30 10:52:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 757 ms / 3,000 ms
コード長 493 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 82,468 KB
実行使用メモリ 273,732 KB
最終ジャッジ日時 2024-04-16 16:14:50
合計ジャッジ時間 14,277 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,352 KB
testcase_01 AC 40 ms
52,096 KB
testcase_02 AC 39 ms
51,840 KB
testcase_03 AC 48 ms
60,544 KB
testcase_04 AC 54 ms
64,256 KB
testcase_05 AC 56 ms
65,152 KB
testcase_06 AC 50 ms
61,440 KB
testcase_07 AC 40 ms
52,608 KB
testcase_08 AC 47 ms
60,416 KB
testcase_09 AC 50 ms
61,696 KB
testcase_10 AC 54 ms
63,232 KB
testcase_11 AC 55 ms
64,640 KB
testcase_12 AC 61 ms
68,480 KB
testcase_13 AC 47 ms
59,648 KB
testcase_14 AC 206 ms
122,764 KB
testcase_15 AC 483 ms
264,508 KB
testcase_16 AC 607 ms
264,584 KB
testcase_17 AC 475 ms
269,816 KB
testcase_18 AC 360 ms
216,128 KB
testcase_19 AC 535 ms
242,300 KB
testcase_20 AC 217 ms
128,820 KB
testcase_21 AC 518 ms
256,616 KB
testcase_22 AC 304 ms
177,352 KB
testcase_23 AC 312 ms
188,100 KB
testcase_24 AC 756 ms
272,236 KB
testcase_25 AC 743 ms
272,188 KB
testcase_26 AC 725 ms
272,144 KB
testcase_27 AC 722 ms
268,716 KB
testcase_28 AC 736 ms
273,432 KB
testcase_29 AC 749 ms
272,648 KB
testcase_30 AC 729 ms
268,340 KB
testcase_31 AC 744 ms
271,768 KB
testcase_32 AC 751 ms
273,732 KB
testcase_33 AC 757 ms
269,444 KB
testcase_34 AC 46 ms
59,392 KB
testcase_35 AC 40 ms
51,840 KB
testcase_36 AC 39 ms
51,968 KB
testcase_37 AC 39 ms
51,840 KB
testcase_38 AC 181 ms
76,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
P = list(map(int,input().split()))
A,B,C,D = [0]*n,[0]*n,[0]*m,[0]*m

for i in range(n):
    A[i],B[i] = map(int,input().split())
for i in range(m):
    C[i],D[i] = map(int,input().split())

ans = 0
for s,t in ((1,1),(1,-1),(-1,1),(-1,-1)):
    dic = {}
    for i in range(n):
        for j in range(m):
            u = C[j]-s*A[i]
            v = D[j]-t*B[i]
            dic[v+(u<<32)] = dic.get(v+(u<<32),0)+P[i]
    ans = max(ans,max(dic.values()))
print(ans)
0