<div style="position: relative; overflow: hidden;"><div>给定一有向图，边长均为1，求长度小于k的环的个数mod m。</div>
<div>保证有向图中无自环(即g[i,i]='N')。</div>
<div>什么样的环属于不同的解，详见样例解释。</div>
<p></p></div></div></div></div><div class="row"><div class="column"><h4 class="ui top attached block header">输入格式</h4><div class="ui bottom attached segment font-content"><div style="position: relative; overflow: hidden;"><div class=con