摘要:
f[i = 以i结尾][j = 长度为j] = 方案数。f[i][j] = sum{ f[i-j][k] , k s(i-2*j+1,j) ) }转移为O(N^3)需要优化,对于k using namespace std;typedef long long ll;const int N = 5e3... 阅读全文
摘要:
E. Minimum spanning tree for each edgetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputConnected ... 阅读全文
摘要:
D. Gadgets for dollars and poundstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNura wants to b... 阅读全文
摘要:
枚举子序列的末尾,递推。方案数:f[i = 以i结尾][k =子序列长度] = sum(f[j][k-1]),j using namespace std;typedef long long ll;const int N = 1e5+5, K = 10;ll C[K][N];ll sum(ll C[]... 阅读全文