結果

問題 No.2711 Connecting Lights
ユーザー titiatitia
提出日時 2024-04-29 02:50:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,201 ms / 5,000 ms
コード長 439 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 76,416 KB
最終ジャッジ日時 2024-04-29 02:51:04
合計ジャッジ時間 12,366 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,840 KB
testcase_01 AC 42 ms
52,096 KB
testcase_02 AC 66 ms
65,792 KB
testcase_03 AC 41 ms
51,584 KB
testcase_04 AC 40 ms
51,840 KB
testcase_05 AC 77 ms
75,776 KB
testcase_06 AC 77 ms
65,664 KB
testcase_07 AC 60 ms
65,152 KB
testcase_08 AC 84 ms
75,904 KB
testcase_09 AC 743 ms
76,032 KB
testcase_10 AC 531 ms
76,160 KB
testcase_11 AC 868 ms
76,416 KB
testcase_12 AC 303 ms
75,776 KB
testcase_13 AC 364 ms
76,032 KB
testcase_14 AC 86 ms
75,776 KB
testcase_15 AC 235 ms
75,520 KB
testcase_16 AC 79 ms
75,776 KB
testcase_17 AC 81 ms
76,032 KB
testcase_18 AC 99 ms
75,776 KB
testcase_19 AC 722 ms
75,968 KB
testcase_20 AC 368 ms
75,776 KB
testcase_21 AC 79 ms
75,776 KB
testcase_22 AC 62 ms
66,560 KB
testcase_23 AC 64 ms
70,272 KB
testcase_24 AC 460 ms
76,160 KB
testcase_25 AC 568 ms
76,160 KB
testcase_26 AC 1,185 ms
75,904 KB
testcase_27 AC 1,000 ms
75,648 KB
testcase_28 AC 1,201 ms
76,160 KB
testcase_29 AC 1,017 ms
76,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

mod=998244353

N,M,K=map(int,input().split())

DP=[1]*(1<<N)

for i in range(M-1):
    NDP=[0]*(1<<N)

    for j in range(1<<N):
        for k in range(1<<N):

            count=0

            for l in range(N):
                if (j & (1<<l) != 0) and (k & (1<<l) != 0):
                    count+=1

            if count>=K:
                NDP[k]=(NDP[k]+DP[j])%mod

    DP=NDP

print(sum(DP)%mod)
0