結果

問題 No.2684 折々の色
ユーザー hato336hato336
提出日時 2024-03-20 22:40:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,385 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 157,120 KB
最終ジャッジ日時 2024-03-20 22:41:36
合計ジャッジ時間 37,326 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
84,792 KB
testcase_01 AC 134 ms
84,792 KB
testcase_02 AC 151 ms
88,120 KB
testcase_03 WA -
testcase_04 AC 150 ms
88,120 KB
testcase_05 AC 134 ms
84,792 KB
testcase_06 AC 148 ms
88,120 KB
testcase_07 WA -
testcase_08 AC 151 ms
88,120 KB
testcase_09 WA -
testcase_10 AC 147 ms
88,120 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 524 ms
137,240 KB
testcase_14 AC 349 ms
107,320 KB
testcase_15 WA -
testcase_16 AC 248 ms
97,336 KB
testcase_17 WA -
testcase_18 AC 486 ms
142,524 KB
testcase_19 AC 551 ms
131,384 KB
testcase_20 AC 490 ms
113,312 KB
testcase_21 AC 281 ms
103,352 KB
testcase_22 AC 568 ms
130,796 KB
testcase_23 AC 573 ms
117,432 KB
testcase_24 AC 320 ms
107,448 KB
testcase_25 AC 418 ms
114,488 KB
testcase_26 AC 673 ms
125,920 KB
testcase_27 AC 444 ms
117,816 KB
testcase_28 AC 570 ms
118,456 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 794 ms
148,292 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 839 ms
148,272 KB
testcase_37 AC 867 ms
148,788 KB
testcase_38 AC 1,221 ms
156,420 KB
testcase_39 AC 1,222 ms
156,224 KB
testcase_40 AC 1,212 ms
156,276 KB
testcase_41 AC 1,251 ms
156,220 KB
testcase_42 AC 1,215 ms
156,224 KB
testcase_43 AC 1,222 ms
156,284 KB
testcase_44 AC 1,246 ms
156,176 KB
testcase_45 AC 1,218 ms
156,244 KB
testcase_46 AC 1,227 ms
156,196 KB
testcase_47 AC 146 ms
88,120 KB
testcase_48 AC 145 ms
88,120 KB
testcase_49 AC 145 ms
88,120 KB
testcase_50 AC 149 ms
88,120 KB
testcase_51 WA -
testcase_52 AC 148 ms
88,120 KB
testcase_53 AC 165 ms
88,120 KB
testcase_54 AC 145 ms
88,120 KB
testcase_55 AC 149 ms
88,120 KB
testcase_56 AC 137 ms
84,792 KB
testcase_57 AC 134 ms
84,792 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())
mod = 2**61-1
base = 101
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 = collections.defaultdict(int)
for i in range(n):
    z = 0
    for j in range(m):
        z += (1 * c[i][-1] * c[i][j]) * (pow(base,j,mod))
        z %= mod
    s[z] += 1

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 = 0
    for j in range(m):
        z += (1 * c[i][-1] * c[i][j]) * (pow(base,j,mod))
        z %= mod
    s[z] -= 1
    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
    v = 0
    for j in range(m):
        v += y[j] * pow(base,j,mod)
        v %= mod
    #print(i,y,s)
    if s[v] >= 1:
        exit(print('Yes'))
    s[z] += 1
print('No')
0