結果
問題 | No.2711 Connecting Lights |
ユーザー | nikoro256 |
提出日時 | 2024-03-31 14:34:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 355 ms / 5,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 82,120 KB |
最終ジャッジ日時 | 2024-03-31 14:34:51 |
合計ジャッジ時間 | 4,347 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
53,460 KB |
testcase_01 | AC | 36 ms
53,460 KB |
testcase_02 | AC | 41 ms
60,028 KB |
testcase_03 | AC | 35 ms
53,460 KB |
testcase_04 | AC | 34 ms
53,460 KB |
testcase_05 | AC | 49 ms
66,344 KB |
testcase_06 | AC | 43 ms
60,016 KB |
testcase_07 | AC | 44 ms
62,360 KB |
testcase_08 | AC | 48 ms
64,424 KB |
testcase_09 | AC | 232 ms
79,400 KB |
testcase_10 | AC | 117 ms
78,632 KB |
testcase_11 | AC | 170 ms
81,064 KB |
testcase_12 | AC | 117 ms
78,632 KB |
testcase_13 | AC | 121 ms
79,420 KB |
testcase_14 | AC | 50 ms
64,424 KB |
testcase_15 | AC | 92 ms
72,488 KB |
testcase_16 | AC | 49 ms
66,344 KB |
testcase_17 | AC | 50 ms
66,344 KB |
testcase_18 | AC | 55 ms
66,472 KB |
testcase_19 | AC | 146 ms
79,912 KB |
testcase_20 | AC | 135 ms
79,428 KB |
testcase_21 | AC | 49 ms
66,344 KB |
testcase_22 | AC | 45 ms
62,356 KB |
testcase_23 | AC | 48 ms
66,624 KB |
testcase_24 | AC | 132 ms
77,992 KB |
testcase_25 | AC | 189 ms
78,504 KB |
testcase_26 | AC | 355 ms
82,120 KB |
testcase_27 | AC | 209 ms
82,120 KB |
testcase_28 | AC | 355 ms
82,120 KB |
testcase_29 | AC | 194 ms
82,120 KB |
ソースコード
N,M,K=map(int,input().split()) dp=[[0]*(2**N) for _ in range(M)] dp[0]=[1]*(2**N) p=998244353 for i in range(M-1): for j in range(2**N): for k in range(2**N): if (k&j).bit_count()>=K: dp[i+1][k]+=dp[i][j] dp[i+1][k]%=p ans=0 for d in dp[-1]: ans+=d ans%=p print(ans)