結果

問題 No.2684 折々の色
ユーザー mymelochanmymelochan
提出日時 2024-03-20 22:29:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,410 bytes
コンパイル時間 571 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 282,516 KB
最終ジャッジ日時 2024-03-20 22:30:32
合計ジャッジ時間 31,423 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
55,596 KB
testcase_01 AC 43 ms
55,596 KB
testcase_02 AC 48 ms
60,880 KB
testcase_03 AC 43 ms
55,596 KB
testcase_04 AC 49 ms
60,880 KB
testcase_05 AC 43 ms
55,596 KB
testcase_06 AC 45 ms
55,596 KB
testcase_07 AC 44 ms
55,596 KB
testcase_08 AC 49 ms
60,880 KB
testcase_09 AC 43 ms
55,596 KB
testcase_10 AC 46 ms
55,596 KB
testcase_11 AC 400 ms
141,612 KB
testcase_12 AC 263 ms
112,980 KB
testcase_13 AC 652 ms
187,708 KB
testcase_14 AC 375 ms
129,492 KB
testcase_15 AC 299 ms
117,076 KB
testcase_16 AC 122 ms
82,900 KB
testcase_17 AC 245 ms
106,580 KB
testcase_18 AC 614 ms
182,004 KB
testcase_19 AC 641 ms
189,524 KB
testcase_20 AC 477 ms
156,756 KB
testcase_21 AC 235 ms
98,772 KB
testcase_22 AC 725 ms
201,480 KB
testcase_23 AC 510 ms
164,692 KB
testcase_24 AC 307 ms
112,724 KB
testcase_25 AC 404 ms
134,612 KB
testcase_26 AC 667 ms
194,704 KB
testcase_27 AC 450 ms
144,212 KB
testcase_28 AC 501 ms
163,924 KB
testcase_29 AC 617 ms
195,668 KB
testcase_30 AC 562 ms
186,964 KB
testcase_31 AC 1,126 ms
274,576 KB
testcase_32 AC 725 ms
225,832 KB
testcase_33 AC 532 ms
176,596 KB
testcase_34 AC 616 ms
196,680 KB
testcase_35 AC 646 ms
196,052 KB
testcase_36 AC 1,116 ms
273,524 KB
testcase_37 AC 1,058 ms
272,560 KB
testcase_38 AC 1,223 ms
279,640 KB
testcase_39 AC 1,241 ms
279,216 KB
testcase_40 AC 1,252 ms
282,516 KB
testcase_41 AC 1,195 ms
279,868 KB
testcase_42 AC 1,251 ms
279,228 KB
testcase_43 AC 1,244 ms
279,120 KB
testcase_44 AC 1,251 ms
279,204 KB
testcase_45 AC 1,215 ms
279,244 KB
testcase_46 AC 1,211 ms
279,956 KB
testcase_47 AC 43 ms
55,596 KB
testcase_48 AC 43 ms
55,596 KB
testcase_49 AC 44 ms
55,596 KB
testcase_50 AC 43 ms
55,596 KB
testcase_51 AC 42 ms
55,596 KB
testcase_52 AC 42 ms
55,596 KB
testcase_53 AC 42 ms
55,596 KB
testcase_54 AC 43 ms
55,596 KB
testcase_55 AC 43 ms
55,596 KB
testcase_56 AC 42 ms
55,596 KB
testcase_57 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#############################################################

import sys
sys.setrecursionlimit(10**7)

from heapq import heappop,heappush
from collections import deque,defaultdict,Counter
from bisect import bisect_left, bisect_right
from itertools import product,combinations,permutations

ipt = sys.stdin.readline

def iin():
    return int(ipt())
def lmin():
    return list(map(int,ipt().split()))

MOD = 998244353
#############################################################

N,M = lmin()
X = lmin()

C = []
T = []
for i in range(N):
    L = lmin()
    C.append(tuple(L[:-1]))
    T.append(L[-1])


S = set()
for i in range(N):

    tpl = []
    for j in range(M):
        u = 10000*X[j]-100*T[i]*C[i][j]
        d = 100-T[i]
        if d == 0:
            break
        if u%d != 0:
            break
        tpl.append(u//d)
    else:
        tpl = tuple(tpl)
        if tpl in S:
            print("Yes")
            exit()

    S.add(tuple(C[i][j]*T[i] for j in range(M)))

C.reverse()
T.reverse()
S = set()
for i in range(N):

    tpl = []
    for j in range(M):
        u = 10000*X[j]-100*T[i]*C[i][j]
        d = 100-T[i]
        if d == 0:
            break
        if u%d != 0:
            break
        tpl.append(u//d)
    else:
        tpl = tuple(tpl)
        if tpl in S:
            print("Yes")
            exit()
            
    S.add(tuple(C[i][j]*T[i] for j in range(M)))

print("No")
0