結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
85,048 KB
testcase_01 AC 132 ms
85,048 KB
testcase_02 AC 177 ms
88,248 KB
testcase_03 AC 131 ms
85,048 KB
testcase_04 AC 142 ms
88,248 KB
testcase_05 AC 132 ms
85,048 KB
testcase_06 AC 142 ms
88,248 KB
testcase_07 AC 131 ms
85,048 KB
testcase_08 AC 142 ms
88,248 KB
testcase_09 AC 142 ms
88,248 KB
testcase_10 AC 142 ms
88,248 KB
testcase_11 AC 478 ms
136,288 KB
testcase_12 AC 383 ms
123,320 KB
testcase_13 AC 543 ms
145,564 KB
testcase_14 AC 331 ms
118,664 KB
testcase_15 AC 416 ms
126,876 KB
testcase_16 AC 238 ms
97,080 KB
testcase_17 AC 377 ms
120,840 KB
testcase_18 AC 508 ms
143,036 KB
testcase_19 AC 550 ms
146,016 KB
testcase_20 AC 405 ms
131,832 KB
testcase_21 AC 270 ms
104,120 KB
testcase_22 AC 563 ms
143,468 KB
testcase_23 AC 448 ms
136,516 KB
testcase_24 AC 317 ms
110,136 KB
testcase_25 AC 373 ms
120,048 KB
testcase_26 AC 534 ms
149,500 KB
testcase_27 AC 397 ms
123,652 KB
testcase_28 AC 443 ms
135,088 KB
testcase_29 AC 780 ms
198,280 KB
testcase_30 AC 751 ms
195,844 KB
testcase_31 AC 764 ms
194,916 KB
testcase_32 AC 794 ms
200,912 KB
testcase_33 AC 761 ms
202,224 KB
testcase_34 AC 779 ms
195,608 KB
testcase_35 AC 749 ms
196,244 KB
testcase_36 AC 742 ms
195,744 KB
testcase_37 AC 744 ms
196,112 KB
testcase_38 AC 796 ms
202,500 KB
testcase_39 AC 835 ms
202,496 KB
testcase_40 AC 801 ms
202,492 KB
testcase_41 AC 810 ms
202,500 KB
testcase_42 AC 839 ms
202,500 KB
testcase_43 AC 794 ms
202,500 KB
testcase_44 AC 822 ms
202,500 KB
testcase_45 AC 829 ms
202,496 KB
testcase_46 AC 794 ms
202,500 KB
testcase_47 AC 143 ms
88,248 KB
testcase_48 AC 141 ms
88,248 KB
testcase_49 AC 143 ms
88,248 KB
testcase_50 AC 145 ms
88,248 KB
testcase_51 AC 144 ms
88,248 KB
testcase_52 AC 145 ms
88,248 KB
testcase_53 AC 146 ms
88,248 KB
testcase_54 AC 146 ms
88,248 KB
testcase_55 AC 146 ms
88,248 KB
testcase_56 WA -
testcase_57 AC 132 ms
85,048 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
    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'))
print('No')
0