摘要:
真是没想到,原来数位dp也能滚动数组优化 题目链接 题意很简单,定义 f ( x ) = { x , x < 10 f ( Π i x i ) , x ≥ 10 f(x)= \left\{\begin{matrix} x,x<10 \\ f(\Pi_ix_i),x≥10 \end{matrix}\r 阅读全文
摘要:
题目 Solution s u m s sum_s sums表示 s s s状态的所有数对应的和 设 f s f_s fs表示状态为 s s s的最大前缀和的方案数 part1 f s ∣ ( 1 < < i ) + = f s ( s u m s > 0 ) f_{s|(1& 阅读全文
摘要:
题目 题解 Code s [ i ] [ j ] [ k ] = ∑ f [ i ] [ j ] [ k ] s[i][j][k]=\sum f[i][j][k] s[i][j][k]=∑f[i][j][k] #include<bits/stdc++.h> using namespace std; 阅读全文
摘要:
题目 Solution 讲课的PPT里的图 Code #include<bits/stdc++.h> using namespace std; const int N=100002; struct node{ int to,ne; }e[N]; int T,i,d[N],x,y,ans[N],n,m 阅读全文