結果
問題 | No.2711 Connecting Lights |
ユーザー |
![]() |
提出日時 | 2024-04-29 02:50:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,171 ms / 5,000 ms |
コード長 | 439 bytes |
コンパイル時間 | 414 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 76,160 KB |
最終ジャッジ日時 | 2024-11-18 01:52:39 |
合計ジャッジ時間 | 11,674 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
import sysinput = sys.stdin.readlinemod=998244353N,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=0for l in range(N):if (j & (1<<l) != 0) and (k & (1<<l) != 0):count+=1if count>=K:NDP[k]=(NDP[k]+DP[j])%modDP=NDPprint(sum(DP)%mod)