链接:link
//贪心法
本题3,4需要额外处理,其余则用从2累加到
sum==n||sum-n>1,x=sum-n;x则为累加中需要去掉的一项。
# include <bits/stdc++.h>
using namespace std;
# define ll long long
int n;
vector<int> mul(vector<int> &xp,int x)
{
vector<int>c;int t=0;
for(int i=
链接:link
//贪心法
本题3,4需要额外处理,其余则用从2累加到
# include <bits/stdc++.h>
using namespace std;
# define ll long long
int n;
vector<int> mul(vector<int> &xp,int x)
{
vector<int>c;int t=0;
for(int i=