結果

問題 No.1726 [Cherry 3rd Tune B] ジャマイカビアポン
ユーザー 👑 KazunKazun
提出日時 2021-08-20 18:02:15
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 584 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 83,344 KB
最終ジャッジ日時 2024-04-16 13:35:28
合計ジャッジ時間 6,001 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
57,472 KB
testcase_01 AC 36 ms
52,224 KB
testcase_02 AC 36 ms
52,096 KB
testcase_03 AC 54 ms
65,664 KB
testcase_04 AC 99 ms
75,956 KB
testcase_05 AC 123 ms
75,968 KB
testcase_06 AC 56 ms
65,280 KB
testcase_07 AC 48 ms
61,568 KB
testcase_08 AC 58 ms
64,384 KB
testcase_09 AC 58 ms
66,176 KB
testcase_10 AC 63 ms
67,712 KB
testcase_11 AC 80 ms
74,112 KB
testcase_12 AC 194 ms
75,912 KB
testcase_13 AC 53 ms
64,000 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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

S=[]
for _ in range(N):
    a,b=map(int,input().split())
    S.append((a,b))

T=[]
for j in range(M):
    c,d=map(int,input().split())
    T.append((c,d))
T_set=set(T)

X=0
for i in range(N):
    a,b=S[i]
    for j in range(M):
        c,d=T[j]
        for s,t in [(1,1),(1,-1),(-1,1),(-1,-1)]:
            u=c-s*a; v=d-t*b

            Y=0
            for k in range(N):
                x,y=S[k]
                if (s*x+u, t*y+v) in T_set:
                    Y+=P[k]

            if X<Y:
                X=Y

print(X)
0