結果
問題 | No.2178 Payable Magic Items |
ユーザー | 👑 p-adic |
提出日時 | 2023-05-29 17:24:40 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 10,820 KB |
実行使用メモリ | 8,012 KB |
最終ジャッジ日時 | 2023-08-27 23:46:50 |
合計ジャッジ時間 | 12,449 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,864 KB |
testcase_01 | AC | 16 ms
7,980 KB |
testcase_02 | AC | 16 ms
7,856 KB |
testcase_03 | AC | 16 ms
7,844 KB |
testcase_04 | AC | 15 ms
7,888 KB |
testcase_05 | AC | 15 ms
7,916 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 15 ms
7,820 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 25 ms
7,976 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
ソースコード
I,R=input,range N,K=map(int,I().split()) M=set() P=pow(5,K-1) for i in R(N): S=int(I(),5) b=0 for m in M: s,t,p=S,m,P for j in R(K): b+=t<s s,t,p=s%p,t%p,p//5 if 1-b:break else: L=[] for m in M: s,t,p,b=S,m,P,1 for j in R(K): b*=t<=s s,t,p=s%p,t%p,p//5 if b:L.append(m) for m in L:M.remove(m) M.add(S) print(N-len(M))