結果
| 問題 |
No.2684 折々の色
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-20 22:30:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,075 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 82,356 KB |
| 実行使用メモリ | 203,404 KB |
| 最終ジャッジ日時 | 2024-09-30 08:31:30 |
| 合計ジャッジ時間 | 24,016 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 1 RE * 43 |
ソースコード
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()
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')