結果

問題 No.2684 折々の色
ユーザー flygonflygon
提出日時 2024-03-20 22:53:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 967 bytes
コンパイル時間 688 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 201,320 KB
最終ジャッジ日時 2024-03-20 22:54:21
合計ジャッジ時間 25,702 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
55,720 KB
testcase_01 AC 43 ms
55,720 KB
testcase_02 AC 46 ms
57,800 KB
testcase_03 AC 44 ms
55,720 KB
testcase_04 AC 46 ms
57,800 KB
testcase_05 AC 43 ms
55,720 KB
testcase_06 AC 44 ms
55,720 KB
testcase_07 AC 44 ms
55,720 KB
testcase_08 AC 47 ms
55,720 KB
testcase_09 AC 45 ms
55,720 KB
testcase_10 AC 44 ms
55,720 KB
testcase_11 AC 431 ms
132,948 KB
testcase_12 AC 320 ms
116,324 KB
testcase_13 AC 497 ms
145,432 KB
testcase_14 AC 301 ms
109,668 KB
testcase_15 AC 337 ms
117,092 KB
testcase_16 AC 165 ms
86,128 KB
testcase_17 AC 298 ms
112,484 KB
testcase_18 AC 461 ms
147,000 KB
testcase_19 AC 493 ms
145,176 KB
testcase_20 AC 367 ms
120,932 KB
testcase_21 AC 185 ms
92,144 KB
testcase_22 AC 433 ms
147,344 KB
testcase_23 AC 357 ms
125,924 KB
testcase_24 AC 201 ms
100,964 KB
testcase_25 AC 280 ms
110,180 KB
testcase_26 AC 449 ms
140,516 KB
testcase_27 AC 308 ms
115,428 KB
testcase_28 AC 350 ms
124,004 KB
testcase_29 AC 807 ms
200,888 KB
testcase_30 AC 743 ms
194,232 KB
testcase_31 AC 764 ms
194,464 KB
testcase_32 AC 774 ms
200,576 KB
testcase_33 AC 807 ms
201,320 KB
testcase_34 AC 759 ms
194,096 KB
testcase_35 AC 743 ms
194,044 KB
testcase_36 AC 755 ms
194,204 KB
testcase_37 AC 759 ms
194,244 KB
testcase_38 AC 770 ms
201,076 KB
testcase_39 AC 794 ms
201,072 KB
testcase_40 AC 769 ms
201,068 KB
testcase_41 AC 803 ms
201,068 KB
testcase_42 AC 809 ms
201,072 KB
testcase_43 AC 788 ms
201,076 KB
testcase_44 AC 780 ms
201,076 KB
testcase_45 AC 804 ms
201,076 KB
testcase_46 AC 768 ms
201,076 KB
testcase_47 AC 45 ms
55,720 KB
testcase_48 AC 44 ms
55,720 KB
testcase_49 AC 44 ms
55,720 KB
testcase_50 AC 44 ms
55,720 KB
testcase_51 AC 44 ms
55,720 KB
testcase_52 AC 44 ms
55,720 KB
testcase_53 AC 45 ms
55,720 KB
testcase_54 AC 44 ms
55,720 KB
testcase_55 AC 44 ms
55,720 KB
testcase_56 AC 44 ms
55,720 KB
testcase_57 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

n,m = map(int,input().split())
x = list(map(int,input().split()))
c = []
t = []
for i in range(n):
    l = list(map(int,input().split()))
    c.append(l[:-1])
    t.append(l[-1])


jj = set()
for i in range(n):
    l = []
    for j in range(m):
        l.append(c[i][j]*t[i])
    l = tuple(l)
    jj.add(l)


ans = 0
for i in range(n):
    l = []
    for j in range(m):
        l.append(c[i][j]*t[i])
    l = tuple(l)
    if t[i] == 100:
        ans |= l== tuple(x)
        continue
    e = []
    ok = 1
    for j in range(m):
        a = 10000*x[j] - 100*t[i]*c[i][j]
        b = 100-t[i]
        ok &= a % b == 0
        e.append(a//b)
    ok &= tuple(e) != l
    if ok:
        ans |= (tuple(e) in jj)

print('Yes') if ans else print('No')
0