結果
問題 | No.2178 Payable Magic Items |
ユーザー | 👑 p-adic |
提出日時 | 2023-05-29 22:04:35 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 270 bytes |
コンパイル時間 | 101 ms |
コンパイル使用メモリ | 10,924 KB |
実行使用メモリ | 21,244 KB |
最終ジャッジ日時 | 2023-08-27 23:56:25 |
合計ジャッジ時間 | 7,950 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,868 KB |
testcase_01 | AC | 17 ms
7,864 KB |
testcase_02 | AC | 15 ms
7,812 KB |
testcase_03 | AC | 1,454 ms
21,244 KB |
testcase_04 | AC | 15 ms
7,928 KB |
testcase_05 | AC | 47 ms
11,216 KB |
testcase_06 | AC | 113 ms
11,692 KB |
testcase_07 | AC | 15 ms
7,928 KB |
testcase_08 | AC | 112 ms
11,656 KB |
testcase_09 | AC | 57 ms
8,956 KB |
testcase_10 | AC | 15 ms
7,820 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.add(s-q) a,b[s-q]=a+(b[s-q]==1),2 print(a)