結果

問題 No.2684 折々の色
ユーザー titiatitia
提出日時 2024-03-24 01:23:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,403 ms / 2,000 ms
コード長 802 bytes
コンパイル時間 900 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 276,024 KB
最終ジャッジ日時 2024-03-24 01:23:59
合計ジャッジ時間 38,954 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
53,504 KB
testcase_01 AC 41 ms
53,504 KB
testcase_02 AC 46 ms
59,264 KB
testcase_03 AC 41 ms
53,888 KB
testcase_04 AC 51 ms
59,776 KB
testcase_05 AC 45 ms
53,632 KB
testcase_06 AC 54 ms
59,264 KB
testcase_07 AC 45 ms
53,760 KB
testcase_08 AC 47 ms
59,264 KB
testcase_09 AC 45 ms
54,016 KB
testcase_10 AC 46 ms
59,008 KB
testcase_11 AC 663 ms
161,768 KB
testcase_12 AC 424 ms
133,560 KB
testcase_13 AC 537 ms
174,356 KB
testcase_14 AC 267 ms
124,392 KB
testcase_15 AC 462 ms
136,424 KB
testcase_16 AC 152 ms
91,572 KB
testcase_17 AC 353 ms
127,544 KB
testcase_18 AC 516 ms
173,100 KB
testcase_19 AC 561 ms
179,820 KB
testcase_20 AC 380 ms
148,968 KB
testcase_21 AC 224 ms
99,048 KB
testcase_22 AC 734 ms
175,848 KB
testcase_23 AC 547 ms
153,104 KB
testcase_24 AC 312 ms
108,764 KB
testcase_25 AC 418 ms
125,760 KB
testcase_26 AC 740 ms
177,008 KB
testcase_27 AC 458 ms
133,728 KB
testcase_28 AC 551 ms
151,764 KB
testcase_29 AC 1,258 ms
269,748 KB
testcase_30 AC 1,102 ms
264,800 KB
testcase_31 AC 827 ms
264,600 KB
testcase_32 AC 1,302 ms
270,196 KB
testcase_33 AC 1,028 ms
275,168 KB
testcase_34 AC 1,106 ms
264,896 KB
testcase_35 AC 1,110 ms
265,120 KB
testcase_36 AC 773 ms
261,604 KB
testcase_37 AC 970 ms
265,000 KB
testcase_38 AC 1,391 ms
276,024 KB
testcase_39 AC 1,378 ms
275,900 KB
testcase_40 AC 1,345 ms
275,896 KB
testcase_41 AC 1,355 ms
275,912 KB
testcase_42 AC 1,368 ms
275,904 KB
testcase_43 AC 1,389 ms
275,896 KB
testcase_44 AC 1,391 ms
275,896 KB
testcase_45 AC 1,403 ms
275,908 KB
testcase_46 AC 1,371 ms
275,896 KB
testcase_47 AC 41 ms
55,600 KB
testcase_48 AC 41 ms
55,600 KB
testcase_49 AC 40 ms
55,600 KB
testcase_50 AC 40 ms
55,600 KB
testcase_51 AC 41 ms
55,600 KB
testcase_52 AC 41 ms
55,600 KB
testcase_53 AC 41 ms
55,600 KB
testcase_54 AC 40 ms
55,600 KB
testcase_55 AC 39 ms
55,600 KB
testcase_56 AC 39 ms
55,600 KB
testcase_57 AC 40 ms
55,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from collections import Counter

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

C=[list(map(int,input().split())) for i in range(N)]

K=Counter()

CC=[]

for i in range(N):
    S=[]
    for j in range(M):
        S.append(C[i][j]*C[i][-1])

    K[tuple(S)]+=1
    CC.append(tuple(S))


for i in range(N):
    S=[]
    if C[i][-1]==100:
        S=C[i][:-1]

        if tuple(S)==tuple(X):
            print("Yes")
            exit()

        continue
    
    for j in range(M):
        if C[i][-1]!=100 and (10000*X[j]-100*C[i][-1]*C[i][j])%(100-C[i][-1])==0:
            S.append((10000*X[j]-100*C[i][-1]*C[i][j])//(100-C[i][-1]))

    K[CC[i]]-=1

    if K[tuple(S)]>0:
        print("Yes")
        exit()

    K[CC[i]]+=1

print("No")
        
0