結果

問題 No.2711 Connecting Lights
ユーザー sasa8uyauyasasa8uyauya
提出日時 2024-04-05 14:18:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 317 ms / 5,000 ms
コード長 243 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 75,424 KB
最終ジャッジ日時 2024-04-05 14:18:10
合計ジャッジ時間 5,202 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 44 ms
60,024 KB
testcase_03 AC 38 ms
53,460 KB
testcase_04 AC 38 ms
53,460 KB
testcase_05 AC 52 ms
64,284 KB
testcase_06 AC 48 ms
60,156 KB
testcase_07 AC 47 ms
62,236 KB
testcase_08 AC 51 ms
62,236 KB
testcase_09 AC 206 ms
75,424 KB
testcase_10 AC 116 ms
75,420 KB
testcase_11 AC 162 ms
75,420 KB
testcase_12 AC 114 ms
75,424 KB
testcase_13 AC 119 ms
75,424 KB
testcase_14 AC 53 ms
64,284 KB
testcase_15 AC 90 ms
70,432 KB
testcase_16 AC 51 ms
64,284 KB
testcase_17 AC 53 ms
66,332 KB
testcase_18 AC 56 ms
66,332 KB
testcase_19 AC 142 ms
75,420 KB
testcase_20 AC 128 ms
75,424 KB
testcase_21 AC 52 ms
66,332 KB
testcase_22 AC 48 ms
62,236 KB
testcase_23 AC 50 ms
66,332 KB
testcase_24 AC 124 ms
75,424 KB
testcase_25 AC 170 ms
75,424 KB
testcase_26 AC 311 ms
75,424 KB
testcase_27 AC 200 ms
75,420 KB
testcase_28 AC 317 ms
75,424 KB
testcase_29 AC 187 ms
75,420 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k=map(int,input().split())
M=998244353
q=[1]*(1<<n)
for _ in range(1,m):
  nq=[0]*(1<<n)
  for i in range(1<<n):
    for j in range(1<<n):
      c=(i&j).bit_count()
      if c>=k:
        nq[j]+=q[i]
        nq[j]%=M
  q=nq
print(sum(q)%M)
0