結果

問題 No.1726 [Cherry 3rd Tune B] ジャマイカビアポン
ユーザー 👑 KazunKazun
提出日時 2021-07-08 16:03:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 711 ms / 3,000 ms
コード長 513 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 273,456 KB
最終ジャッジ日時 2024-04-16 13:28:08
合計ジャッジ時間 12,931 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,096 KB
testcase_01 AC 36 ms
51,840 KB
testcase_02 AC 36 ms
52,096 KB
testcase_03 AC 44 ms
60,160 KB
testcase_04 AC 50 ms
64,128 KB
testcase_05 AC 56 ms
64,512 KB
testcase_06 AC 45 ms
60,928 KB
testcase_07 AC 37 ms
52,480 KB
testcase_08 AC 44 ms
59,904 KB
testcase_09 AC 45 ms
61,056 KB
testcase_10 AC 48 ms
63,232 KB
testcase_11 AC 52 ms
64,128 KB
testcase_12 AC 54 ms
67,840 KB
testcase_13 AC 41 ms
59,392 KB
testcase_14 AC 183 ms
128,128 KB
testcase_15 AC 424 ms
251,596 KB
testcase_16 AC 532 ms
266,364 KB
testcase_17 AC 416 ms
251,608 KB
testcase_18 AC 329 ms
189,344 KB
testcase_19 AC 504 ms
267,380 KB
testcase_20 AC 199 ms
130,848 KB
testcase_21 AC 488 ms
266,156 KB
testcase_22 AC 278 ms
155,492 KB
testcase_23 AC 299 ms
160,360 KB
testcase_24 AC 711 ms
266,084 KB
testcase_25 AC 674 ms
273,388 KB
testcase_26 AC 690 ms
266,248 KB
testcase_27 AC 641 ms
273,456 KB
testcase_28 AC 654 ms
273,440 KB
testcase_29 AC 639 ms
265,772 KB
testcase_30 AC 647 ms
273,452 KB
testcase_31 AC 658 ms
266,032 KB
testcase_32 AC 663 ms
273,312 KB
testcase_33 AC 672 ms
264,428 KB
testcase_34 AC 42 ms
59,136 KB
testcase_35 AC 38 ms
52,096 KB
testcase_36 AC 38 ms
51,968 KB
testcase_37 AC 36 ms
51,840 KB
testcase_38 AC 159 ms
76,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline

N,M=map(int,input().split())

P=list(map(int,input().split()))

S=[]
a=[0]*N; b=[0]*N
for i in range(N):
    a[i],b[i]=map(int,input().split())

T=[]
c=[0]*M; d=[0]*M
for j in range(M):
    c[j],d[j]=map(int,input().split())

msk=1<<32
X=0
for s,t in [(1,1),(1,-1),(-1,1),(-1,-1)]:
    D={}
    for i in range(N):
        for j in range(M):
            u=c[j]-s*a[i]; v=d[j]-t*b[i]
            g=u*msk+v
            D[g]=D.get(g,0)+P[i]
    X=max(X,max(D.values()))

print(X)
0