結果
問題 | No.2684 折々の色 |
ユーザー |
![]() |
提出日時 | 2024-11-04 17:09:16 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 636 bytes |
コンパイル時間 | 438 ms |
コンパイル使用メモリ | 81,964 KB |
実行使用メモリ | 158,408 KB |
最終ジャッジ日時 | 2024-11-04 17:09:46 |
合計ジャッジ時間 | 28,313 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 TLE * 4 -- * 31 |
ソースコード
n,m=map(int,input().split())x=list(map(int,input().split()))for i in range(m):x[i]*=10000cs=[]ts=[]for i in range(n):q=list(map(int,input().split()))c=q[:m]t=q[m]cs+=[c]ts+=[t]d={tuple(c):i for i,c in enumerate(cs)}for i in range(n):c1=cs[i]t1=ts[i]if t1==100:if c1==x:print("Yes")exit()continuefor t2 in range(1,101):c2=[]for j in range(m):if (x[j]-100*t1*c1[j])%((100-t1)*t2)==0:c2+=[(x[j]-100*t1*c1[j])//((100-t1)*t2)]c2=tuple(c2)if c1!=c2:if c2 in d:if ts[d[c2]]==t2:print("Yes")exit()print("No")