結果

問題 No.2684 折々の色
ユーザー 👑 rin204rin204
提出日時 2024-02-29 22:04:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 970 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 82,712 KB
実行使用メモリ 249,344 KB
最終ジャッジ日時 2024-09-29 18:31:11
合計ジャッジ時間 26,155 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,968 KB
testcase_01 AC 35 ms
52,352 KB
testcase_02 AC 38 ms
53,760 KB
testcase_03 AC 40 ms
53,376 KB
testcase_04 AC 38 ms
54,016 KB
testcase_05 AC 39 ms
52,608 KB
testcase_06 AC 40 ms
53,120 KB
testcase_07 AC 39 ms
52,668 KB
testcase_08 AC 36 ms
53,248 KB
testcase_09 AC 37 ms
52,992 KB
testcase_10 AC 38 ms
52,992 KB
testcase_11 AC 421 ms
156,812 KB
testcase_12 AC 332 ms
132,612 KB
testcase_13 AC 492 ms
178,176 KB
testcase_14 AC 269 ms
120,800 KB
testcase_15 AC 369 ms
138,672 KB
testcase_16 AC 156 ms
92,672 KB
testcase_17 AC 305 ms
126,988 KB
testcase_18 AC 501 ms
186,944 KB
testcase_19 AC 478 ms
174,028 KB
testcase_20 AC 346 ms
136,496 KB
testcase_21 AC 204 ms
99,324 KB
testcase_22 AC 517 ms
188,104 KB
testcase_23 AC 385 ms
146,004 KB
testcase_24 AC 245 ms
108,868 KB
testcase_25 AC 303 ms
124,780 KB
testcase_26 AC 468 ms
171,148 KB
testcase_27 AC 330 ms
130,572 KB
testcase_28 AC 375 ms
146,112 KB
testcase_29 AC 779 ms
244,952 KB
testcase_30 AC 749 ms
243,716 KB
testcase_31 AC 724 ms
243,840 KB
testcase_32 AC 774 ms
248,200 KB
testcase_33 AC 763 ms
248,316 KB
testcase_34 AC 801 ms
243,644 KB
testcase_35 AC 826 ms
243,884 KB
testcase_36 AC 826 ms
243,616 KB
testcase_37 AC 815 ms
243,952 KB
testcase_38 AC 888 ms
249,344 KB
testcase_39 AC 784 ms
249,080 KB
testcase_40 AC 778 ms
248,972 KB
testcase_41 AC 802 ms
249,076 KB
testcase_42 AC 826 ms
248,884 KB
testcase_43 AC 823 ms
248,972 KB
testcase_44 AC 805 ms
249,080 KB
testcase_45 AC 809 ms
248,888 KB
testcase_46 AC 799 ms
249,096 KB
testcase_47 AC 38 ms
52,752 KB
testcase_48 AC 37 ms
54,404 KB
testcase_49 AC 37 ms
54,372 KB
testcase_50 AC 38 ms
54,696 KB
testcase_51 AC 37 ms
53,540 KB
testcase_52 AC 36 ms
53,632 KB
testcase_53 AC 36 ms
53,220 KB
testcase_54 AC 36 ms
53,440 KB
testcase_55 AC 36 ms
53,020 KB
testcase_56 WA -
testcase_57 AC 35 ms
53,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
assert 2 <= n <= 200000
assert 1 <= m <= 10
X = list(map(int, input().split()))
assert all(0 <= x < (1 << 16) for x in X)
C = []
T = []
for _ in range(n):
    C_ = list(map(int, input().split()))
    t = C_.pop()
    assert len(C_) == m
    assert 0 < t <= 100
    assert all(0 <= c < (1 << 16) for c in C_)

    T.append(t)
    C.append(C_)

inds = {}
for i in range(n):
    if T[i] == 100:
        if C[i] == X:
            print("Yes")
            exit()
    D = tuple(T[i] * c for c in C[i])
    inds.setdefault(D, []).append(i)

X = [x * 10000 for x in X]


for i in range(n):
    if T[i] == 100:
        continue
    D = [0] * m
    ok = True
    for j in range(m):
        D[j] = X[j] - 100 * T[i] * C[i][j]
        if D[j] % (100 - T[i]) != 0:
            ok = False
            break
        D[j] //= 100 - T[i]

    if ok:
        tup = tuple(D)
        if tup in inds:
            print("Yes")
            exit()

print("No")
0