結果
問題 | No.2178 Payable Magic Items |
ユーザー | 👑 p-adic |
提出日時 | 2023-05-29 22:05:46 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 273 bytes |
コンパイル時間 | 77 ms |
コンパイル使用メモリ | 10,776 KB |
実行使用メモリ | 20,548 KB |
最終ジャッジ日時 | 2023-08-27 23:56:41 |
合計ジャッジ時間 | 7,689 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,976 KB |
testcase_01 | AC | 16 ms
7,792 KB |
testcase_02 | AC | 17 ms
7,936 KB |
testcase_03 | AC | 1,313 ms
11,212 KB |
testcase_04 | AC | 15 ms
7,812 KB |
testcase_05 | AC | 46 ms
11,020 KB |
testcase_06 | AC | 112 ms
11,172 KB |
testcase_07 | AC | 15 ms
7,808 KB |
testcase_08 | AC | 108 ms
11,104 KB |
testcase_09 | AC | 54 ms
8,668 KB |
testcase_10 | AC | 15 ms
7,848 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
ソースコード
I,R=input,range N,K=map(int,I().split()) p=[pow(5,i)for i in R(K+1)] S=[int(I(),5)for i in R(N)] b=[s in S for s in R(p[K])] a=0 for s in S: L=[s] while len(L): s=L.pop() for q in p: if s%(q*5)//q*(b[s-q]<2): L.append(s-q) a,b[s-q]=a+(b[s-q]==1),2 print(a)