結果

問題 No.2684 折々の色
ユーザー AyunaAyuna
提出日時 2023-12-15 23:34:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 849 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 216,328 KB
最終ジャッジ日時 2024-03-07 02:20:25
合計ジャッジ時間 60,428 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,984 KB
testcase_01 AC 28 ms
9,984 KB
testcase_02 AC 29 ms
10,112 KB
testcase_03 AC 28 ms
9,984 KB
testcase_04 AC 29 ms
10,112 KB
testcase_05 AC 28 ms
9,984 KB
testcase_06 AC 29 ms
10,112 KB
testcase_07 AC 29 ms
9,984 KB
testcase_08 AC 29 ms
10,112 KB
testcase_09 AC 28 ms
9,984 KB
testcase_10 AC 29 ms
9,984 KB
testcase_11 AC 1,206 ms
98,276 KB
testcase_12 AC 747 ms
68,940 KB
testcase_13 AC 1,166 ms
106,392 KB
testcase_14 AC 577 ms
61,880 KB
testcase_15 AC 854 ms
71,688 KB
testcase_16 AC 206 ms
23,312 KB
testcase_17 AC 666 ms
60,556 KB
testcase_18 AC 1,120 ms
100,612 KB
testcase_19 AC 1,230 ms
116,404 KB
testcase_20 AC 815 ms
91,568 KB
testcase_21 AC 338 ms
30,708 KB
testcase_22 AC 1,332 ms
101,808 KB
testcase_23 AC 951 ms
93,552 KB
testcase_24 AC 487 ms
41,076 KB
testcase_25 AC 690 ms
58,676 KB
testcase_26 AC 1,304 ms
118,260 KB
testcase_27 AC 816 ms
73,976 KB
testcase_28 AC 958 ms
93,148 KB
testcase_29 TLE -
testcase_30 TLE -
testcase_31 AC 1,829 ms
200,344 KB
testcase_32 TLE -
testcase_33 TLE -
testcase_34 TLE -
testcase_35 TLE -
testcase_36 AC 1,820 ms
198,452 KB
testcase_37 AC 1,919 ms
200,192 KB
testcase_38 TLE -
testcase_39 TLE -
testcase_40 TLE -
testcase_41 TLE -
testcase_42 TLE -
testcase_43 TLE -
testcase_44 TLE -
testcase_45 TLE -
testcase_46 TLE -
testcase_47 AC 29 ms
9,984 KB
testcase_48 AC 29 ms
9,984 KB
testcase_49 AC 29 ms
9,984 KB
testcase_50 AC 28 ms
9,984 KB
testcase_51 AC 28 ms
9,984 KB
testcase_52 AC 30 ms
9,984 KB
testcase_53 AC 28 ms
9,984 KB
testcase_54 AC 29 ms
9,984 KB
testcase_55 AC 29 ms
9,984 KB
testcase_56 AC 29 ms
9,984 KB
testcase_57 AC 28 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0