p2679
P2679 [NOIP2015 提高组] 子串 题解
#include <bits/stdc++.h> using namespace std; #define int long long const int MOD = 1000000007; int n,m,k,dp[205][205][2]; char A[1005],B[205]; signed ......
P2679 [NOIP2015 提高组] 子串
注意 \(A\) 中取相同位置子串划分方式不同也算作不同的方案。 令 \(f_{i,j,l,0/1}\) 表示 \(A\) 中前 \(i\) 个字符,取出 \(l\) 个子串,拼成了 \(B\) 中前 \(j\) 个字符,第 \(i\) 个字符取/不取的方案数。 不取直接累加 \(A\) 中上一个字 ......
[刷题笔记] Luogu P2679 [NOIP2015 提高组] 子串
[Problem](https://www.luogu.com.cn/problem/P2679) ### Description 我们可以换个思路。 从字符串 $A$ 中拿出 $k$ 个字串使其变成 $B$。求有几种不同的方案? ### Analysis 我们发现 $A$ 中的一个字符取或者不取影 ......