摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 int dp[205][5050]; 4 int v[205],w[205]; 5 int n,k; 6 int main() 7 { 8 //cout<< log(1e18)/log(5)<<en 阅读全文
posted @ 2021-11-29 21:51
matt-11
阅读(51)
评论(0)
推荐(0)
摘要:
分析一下,能产生0的只有2和5的因子乘积,所以尾部是0的个数取决于min(cnt(2),cnt(5));//2和5因子幂次取最小值; n个数恰好取k个使得2和5的min尽量大,这时二维状态不够,把5当做第三维 dp[i][k][c5]表示前i个数取k个,5的幂为c5时2的幂的最大值,答案就是dp[i 阅读全文
posted @ 2021-11-29 21:27
matt-11
阅读(36)
评论(0)
推荐(0)
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 LL n,m,k; 5 int check(LL x) 6 { 7 LL s=0,j=m; 8 for(LL i=1;i<=n;i++) 9 { 10 阅读全文
posted @ 2021-11-29 21:17
matt-11
阅读(27)
评论(0)
推荐(0)
摘要:
1 typedef pair<int,int> pii; 2 const int N=1e5+5; 3 class Solution { 4 public: 5 struct cmp{ 6 bool operator()(pii &a, pii &b) 7 { 8 return a.second>b 阅读全文
posted @ 2021-11-29 17:36
matt-11
阅读(54)
评论(0)
推荐(0)

浙公网安备 33010602011771号