結果

問題 No.2711 Connecting Lights
ユーザー hiryuNhiryuN
提出日時 2024-03-31 14:04:08
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 525 bytes
コンパイル時間 178 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,572 KB
最終ジャッジ日時 2024-03-31 14:04:49
合計ジャッジ時間 15,239 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 43 ms
53,460 KB
testcase_02 AC 76 ms
75,792 KB
testcase_03 AC 39 ms
53,460 KB
testcase_04 AC 39 ms
53,460 KB
testcase_05 AC 135 ms
75,896 KB
testcase_06 AC 87 ms
75,756 KB
testcase_07 AC 79 ms
75,780 KB
testcase_08 AC 158 ms
76,288 KB
testcase_09 AC 4,270 ms
76,436 KB
testcase_10 AC 3,363 ms
76,128 KB
testcase_11 TLE -
testcase_12 AC 1,295 ms
76,260 KB
testcase_13 AC 1,553 ms
75,884 KB
testcase_14 AC 195 ms
75,888 KB
testcase_15 AC 846 ms
76,000 KB
testcase_16 AC 134 ms
75,896 KB
testcase_17 AC 148 ms
75,896 KB
testcase_18 AC 263 ms
76,288 KB
testcase_19 AC 4,803 ms
76,256 KB
testcase_20 AC 1,636 ms
76,260 KB
testcase_21 AC 139 ms
75,896 KB
testcase_22 AC 87 ms
75,780 KB
testcase_23 AC 93 ms
75,812 KB
testcase_24 AC 2,777 ms
76,460 KB
testcase_25 AC 3,332 ms
76,308 KB
testcase_26 TLE -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,d=map(int,input().split())
M=998244353
D=[1]*(2**n)
for i in range(m-1):
    nD=[0]*(2**n)
    for j in range(2**n,2**(n+1)):
        key=str(bin(j))[3:]
        for k in range(2**n,2**(n+1)):
            kay=str(bin(k))[3:]
            #print(key,kay)
            cnt=0
            for t in range(n):
                if key[t]=="1" and kay[t]=="1":
                    cnt+=1
            if cnt>=d:
                nD[j-2**n]+=D[k-2**n]
                nD[j-2**n]%=M
    D=nD[:]
print(sum(D)%M)
            
            
0