結果

問題 No.2684 折々の色
ユーザー hato336hato336
提出日時 2024-03-20 22:34:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,211 bytes
コンパイル時間 246 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 213,472 KB
最終ジャッジ日時 2024-03-20 22:35:50
合計ジャッジ時間 33,982 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
85,048 KB
testcase_01 AC 165 ms
85,048 KB
testcase_02 AC 154 ms
88,376 KB
testcase_03 WA -
testcase_04 AC 152 ms
88,376 KB
testcase_05 AC 133 ms
84,920 KB
testcase_06 AC 147 ms
88,376 KB
testcase_07 WA -
testcase_08 AC 182 ms
88,376 KB
testcase_09 WA -
testcase_10 AC 147 ms
88,248 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 577 ms
149,772 KB
testcase_14 AC 350 ms
118,656 KB
testcase_15 WA -
testcase_16 AC 260 ms
97,848 KB
testcase_17 WA -
testcase_18 AC 576 ms
143,028 KB
testcase_19 AC 588 ms
148,788 KB
testcase_20 AC 431 ms
133,732 KB
testcase_21 AC 304 ms
104,248 KB
testcase_22 AC 687 ms
146,236 KB
testcase_23 AC 521 ms
136,452 KB
testcase_24 AC 359 ms
110,136 KB
testcase_25 AC 441 ms
120,160 KB
testcase_26 AC 647 ms
153,496 KB
testcase_27 AC 474 ms
125,396 KB
testcase_28 AC 530 ms
135,548 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 770 ms
196,568 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 762 ms
196,764 KB
testcase_37 AC 805 ms
197,880 KB
testcase_38 AC 997 ms
212,752 KB
testcase_39 AC 1,002 ms
212,888 KB
testcase_40 AC 1,006 ms
213,036 KB
testcase_41 AC 996 ms
212,880 KB
testcase_42 AC 986 ms
212,896 KB
testcase_43 AC 1,008 ms
212,988 KB
testcase_44 AC 1,014 ms
212,896 KB
testcase_45 AC 994 ms
212,900 KB
testcase_46 AC 1,017 ms
213,472 KB
testcase_47 AC 143 ms
88,248 KB
testcase_48 AC 146 ms
88,248 KB
testcase_49 AC 145 ms
88,248 KB
testcase_50 AC 144 ms
88,248 KB
testcase_51 WA -
testcase_52 AC 145 ms
88,248 KB
testcase_53 AC 144 ms
88,248 KB
testcase_54 AC 145 ms
88,248 KB
testcase_55 AC 148 ms
88,248 KB
testcase_56 AC 134 ms
85,048 KB
testcase_57 AC 133 ms
84,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
n,m = map(int,input().split())
x = list(map(int,input().split()))
for i in range(m):
    x[i] *= 10000
c = [list(map(int,input().split())) for i in range(n)]
s = set()
for i in range(n):
    z = []
    for j in range(m):
        z.append(1 * c[i][-1] * c[i][j])
    s.add(tuple(z))

for i in range(n):
    if 100 - c[i][-1] == 0:
        cnt = 0
        for j in range(m):
            if x[j] == 100 * c[i][j] * c[i][-1]:
                cnt += 1
            else:
                break
        if cnt == m:
            print('Yes')
            exit()
        continue
    z = []
    for j in range(m):
        z.append(1 * c[i][-1] * c[i][j])
    s.discard(tuple(z))
    y = []
    for j in range(m):
        y.append(x[j] - 100*c[i][-1]*c[i][j])
    check = 1
    for j in range(m):
        if y[j] % (100 - c[i][-1]) != 0:
            check = 0
            break
        else:
            y[j] //= (100 - c[i][-1])
    if check == 0:
        continue
    #print(i,y,s)
    if tuple(y) in s:
        exit(print('Yes'))
    s.add(tuple(z))
print('No')
0