求算复杂度
查看原帖
求算复杂度
516108
_t_g_j_x楼主2024/10/26 23:36

考场写了个这玩意,不怎么会算复杂度

f[0][1]=1
for(int i=1;i<=r;i++){
	for(int j=1;j<=n;j++){
		int u=max(k,l[j]);
        for(int le=2;le<=u;le++){
			for(int r=0;r+le-1<l[j];r++){
				f[i][s[j][r+le-1]]|=f[i-1][s[j][r]];//前后不能同一个的判断略
            }
		}
	}
}
2024/10/26 23:36
加载中...