結果

問題 No.2684 折々の色
ユーザー hato336hato336
提出日時 2024-03-20 22:27:02
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 825 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 203,644 KB
最終ジャッジ日時 2024-09-30 08:25:50
合計ジャッジ時間 26,107 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 11 WA * 1 RE * 44
権限があれば一括ダウンロードができます

ソースコード

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):
    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