题目
SWUST_Vector
心怀希望的人最强大!!!
展开
-
dp题
执行乘法运算的最大分数 题目链接 分析数据: nums长度为n; multipliers长度为m; 1<=m<=1000; 1<=n<=100000; nums和multipliers都在(-1000,1000); 对于每一个multipliers[i]都需要和nums左右两端的数字组合,需要求得最大的匹配值。 设dp[]i[j]状态为左边取i个,右边取j个。 i=0时, dp[0][j]=dp[0][j-1]+nums右边第j个乘上multipliers[]; j=0时,dp[i]原创 2021-02-24 19:28:18 · 96 阅读 · 0 评论 -
Codeforces Round #641(Div 2)
A. Orac and Factors 题目描述:For n≥2, we will denote as f(n) the smallest positive divisor of n, except 1.定义f(n) 为n的最小因子,除1以外。 Now, for two positive integers n and k, Orac asked you to add f(n) to n exactly k times (note that n will change after each operation原创 2020-05-13 15:56:57 · 184 阅读 · 0 评论