摘要:
/* HDU 6078 - Wavel Sequence [ DP ] | 2017 Multi-University Training Contest 4 题意: 给定 a[N], b[M] 要求满足 a[f(1)]a[f(3)]a[f(5)] a[i] 设 sum[i-1][y][1] = ∑dp[x][y][1] , x a[i] 对于每一个 b[j], sum[i]... 阅读全文
摘要:
/* CodeForces - 837E - Vasya's Function [ 数论 ] | Educational Codeforces Round 26 题意: f(a, 0) = 0; f(a, b) = 1 + f(a, b-gcd(a, b)); 求 f(a, b) , a,b using namespace std; #define LL long long cons... 阅读全文
摘要:
/* CodeForces 837D - Round Subset [ DP ] | Educational Codeforces Round 26 题意: 选k个数相乘让末尾0最多 分析: 第i个数字有a[i]个2, b[i] 个5 以其中一维作体积另一维作价值01背包即可 */ #include using namespace std; int dp[205][20005]; i... 阅读全文