結果
問題 | No.2178 Payable Magic Items |
ユーザー |
👑 |
提出日時 | 2023-05-29 17:24:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-28 10:03:18 |
合計ジャッジ時間 | 14,334 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 19 |
ソースコード
I,R=input,rangeN,K=map(int,I().split())M=set()P=pow(5,K-1)for i in R(N):S=int(I(),5)b=0for m in M:s,t,p=S,m,Pfor j in R(K):b+=t<ss,t,p=s%p,t%p,p//5if 1-b:breakelse:L=[]for m in M:s,t,p,b=S,m,P,1for j in R(K):b*=t<=ss,t,p=s%p,t%p,p//5if b:L.append(m)for m in L:M.remove(m)M.add(S)print(N-len(M))