思路:预处理出因数,然后dp#include<bits/stdc++.h>using namespace std;#define int long longconst int N=1010,M=1e5+10,mod=1e9+7;vector<int>v[M];bool st[M];int f[N],n,a...
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), l...
转载:来源 #include<bits/stdc++.h>using namespace std;#define int long longconst int N=5e4+10;int n,m,K,e[N<<1],ne[N<<1],h[N],idx,w[N<<1];int f[N][110],ans=LLO...