結果
| 問題 |
No.2684 折々の色
|
| コンテスト | |
| ユーザー |
Ayuna
|
| 提出日時 | 2023-12-15 23:34:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 849 bytes |
| コンパイル時間 | 1,093 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 217,096 KB |
| 最終ジャッジ日時 | 2024-09-29 18:29:43 |
| 合計ジャッジ時間 | 61,284 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 40 TLE * 16 |
ソースコード
n, m = map(int, input().split())
x = list(map(int, input().split()))
a = [list(map(int, input().split())) for _ in range(n)]
dic = dict()
for i in range(n):
lis = []
for j in range(m):
lis.append(a[i][j] * a[i][-1])
tup = tuple(lis)
if tup in dic:
dic[tup] = -1
else:
dic[tup] = i
for i in range(n):
if a[i][-1] == 100:
if a[i][:-1] == x:
print("Yes")
exit()
else:
flg = True
predict = []
for j in range(m):
k = x[j] * 10000 - 100 * a[i][-1] * a[i][j]
if k % (100 - a[i][-1]) != 0:
flg = False
break
predict.append(k // (100 - a[i][-1]))
tup = tuple(predict)
if flg and tup in dic and dic[tup] != i:
print("Yes")
exit()
print("No")
Ayuna