結果

問題 No.2684 折々の色
ユーザー 👑 rin204rin204
提出日時 2024-02-29 22:04:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 970 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 248,480 KB
最終ジャッジ日時 2024-03-07 02:22:44
合計ジャッジ時間 26,626 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 54 ms
53,460 KB
testcase_03 AC 36 ms
53,460 KB
testcase_04 AC 40 ms
55,592 KB
testcase_05 AC 35 ms
53,460 KB
testcase_06 AC 37 ms
53,460 KB
testcase_07 AC 35 ms
53,456 KB
testcase_08 AC 43 ms
53,460 KB
testcase_09 AC 64 ms
53,460 KB
testcase_10 AC 39 ms
53,460 KB
testcase_11 AC 461 ms
156,444 KB
testcase_12 AC 361 ms
132,200 KB
testcase_13 AC 556 ms
177,828 KB
testcase_14 AC 312 ms
120,012 KB
testcase_15 AC 392 ms
138,272 KB
testcase_16 AC 168 ms
92,276 KB
testcase_17 AC 322 ms
125,984 KB
testcase_18 AC 577 ms
186,604 KB
testcase_19 AC 516 ms
172,956 KB
testcase_20 AC 365 ms
136,208 KB
testcase_21 AC 211 ms
98,920 KB
testcase_22 AC 559 ms
187,540 KB
testcase_23 AC 403 ms
145,468 KB
testcase_24 AC 263 ms
108,340 KB
testcase_25 AC 322 ms
124,640 KB
testcase_26 AC 486 ms
170,624 KB
testcase_27 AC 362 ms
129,736 KB
testcase_28 AC 403 ms
145,324 KB
testcase_29 AC 767 ms
244,620 KB
testcase_30 AC 773 ms
243,228 KB
testcase_31 AC 748 ms
243,392 KB
testcase_32 AC 793 ms
247,452 KB
testcase_33 AC 801 ms
248,268 KB
testcase_34 AC 787 ms
243,068 KB
testcase_35 AC 799 ms
243,020 KB
testcase_36 AC 764 ms
243,304 KB
testcase_37 AC 784 ms
243,416 KB
testcase_38 AC 823 ms
248,464 KB
testcase_39 AC 820 ms
248,468 KB
testcase_40 AC 848 ms
248,480 KB
testcase_41 AC 818 ms
248,476 KB
testcase_42 AC 820 ms
248,472 KB
testcase_43 AC 814 ms
248,472 KB
testcase_44 AC 834 ms
248,472 KB
testcase_45 AC 811 ms
248,472 KB
testcase_46 AC 828 ms
248,472 KB
testcase_47 AC 37 ms
53,460 KB
testcase_48 AC 37 ms
53,460 KB
testcase_49 AC 36 ms
53,460 KB
testcase_50 AC 36 ms
53,460 KB
testcase_51 AC 36 ms
53,460 KB
testcase_52 AC 37 ms
53,460 KB
testcase_53 AC 37 ms
53,460 KB
testcase_54 AC 37 ms
53,460 KB
testcase_55 AC 36 ms
53,460 KB
testcase_56 WA -
testcase_57 AC 36 ms
53,460 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