結果

問題 No.2684 折々の色
ユーザー とりゐとりゐ
提出日時 2024-03-20 21:50:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 649 ms / 2,000 ms
コード長 658 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 156,728 KB
最終ジャッジ日時 2024-03-20 21:50:27
合計ジャッジ時間 21,387 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
55,468 KB
testcase_01 AC 40 ms
55,468 KB
testcase_02 AC 44 ms
55,468 KB
testcase_03 AC 41 ms
55,468 KB
testcase_04 AC 44 ms
55,468 KB
testcase_05 AC 40 ms
55,468 KB
testcase_06 AC 42 ms
55,468 KB
testcase_07 AC 41 ms
55,468 KB
testcase_08 AC 42 ms
55,468 KB
testcase_09 AC 42 ms
55,468 KB
testcase_10 AC 43 ms
55,468 KB
testcase_11 AC 373 ms
113,196 KB
testcase_12 AC 251 ms
99,052 KB
testcase_13 AC 388 ms
119,048 KB
testcase_14 AC 230 ms
96,428 KB
testcase_15 AC 301 ms
101,548 KB
testcase_16 AC 144 ms
81,388 KB
testcase_17 AC 240 ms
97,120 KB
testcase_18 AC 364 ms
115,868 KB
testcase_19 AC 389 ms
120,896 KB
testcase_20 AC 293 ms
107,060 KB
testcase_21 AC 164 ms
83,960 KB
testcase_22 AC 377 ms
116,496 KB
testcase_23 AC 331 ms
107,700 KB
testcase_24 AC 199 ms
88,684 KB
testcase_25 AC 240 ms
96,576 KB
testcase_26 AC 365 ms
118,072 KB
testcase_27 AC 262 ms
100,224 KB
testcase_28 AC 327 ms
107,448 KB
testcase_29 AC 578 ms
155,064 KB
testcase_30 AC 576 ms
150,324 KB
testcase_31 AC 555 ms
150,968 KB
testcase_32 AC 615 ms
155,700 KB
testcase_33 AC 596 ms
155,812 KB
testcase_34 AC 571 ms
150,072 KB
testcase_35 AC 575 ms
150,720 KB
testcase_36 AC 552 ms
150,328 KB
testcase_37 AC 574 ms
150,712 KB
testcase_38 AC 613 ms
156,196 KB
testcase_39 AC 621 ms
156,724 KB
testcase_40 AC 612 ms
156,728 KB
testcase_41 AC 625 ms
156,724 KB
testcase_42 AC 609 ms
156,596 KB
testcase_43 AC 634 ms
156,596 KB
testcase_44 AC 649 ms
156,284 KB
testcase_45 AC 607 ms
156,608 KB
testcase_46 AC 640 ms
156,596 KB
testcase_47 AC 42 ms
55,468 KB
testcase_48 AC 43 ms
55,468 KB
testcase_49 AC 42 ms
55,468 KB
testcase_50 AC 42 ms
55,468 KB
testcase_51 AC 42 ms
55,468 KB
testcase_52 AC 42 ms
55,468 KB
testcase_53 AC 42 ms
55,468 KB
testcase_54 AC 42 ms
55,468 KB
testcase_55 AC 42 ms
55,468 KB
testcase_56 AC 40 ms
55,468 KB
testcase_57 AC 40 ms
55,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

n,m=map(int,input().split())
d=defaultdict(list)
X=list(map(int,input().split()))
C=[]
for i in range(n):
  CiT=list(map(int,input().split()))
  Ci=CiT[:-1]
  T=CiT[-1]
  if T==100:
    if Ci==X:
      print("Yes")
      exit()
  else:
    res=[]
    for j in range(m):
      if (10000*X[j]-100*T*Ci[j])%(100-T)==0:
        res.append((10000*X[j]-100*T*Ci[j])//(100-T))
    if len(res)==m:
      d[tuple(res)].append(i)
  
  D=[]
  for j in range(m):
    D.append(T*Ci[j])
  C.append(tuple(D))
  
for i in range(n):
  if C[i] in d:
    for idx in d[C[i]]:
      if idx!=i:
        print("Yes")
        exit()

print("No")
0