您当前的位置: 首页 >  HeartFireY

牛客多校7.H.xay loves count 思维

HeartFireY 发布时间:2021-08-07 14:57:05 ,浏览量:4

😀 算法标签:数学/思维

建权值数组,枚举所有因子,记录合法方案数即可。

时间复杂度 O ( N log ⁡ N ) O(N \log N) O(NlogN)

#include 
#define int long long
using namespace std;

const int maxn = 1e6 + 10;
int a[maxn];

signed main(){
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    int n = 0; cin >> n;
    for(int i = 1; i > x;
        a[x]++;
    }
    int t = 0, ans = 0;
    for(int i = 1; i             
关注
打赏
1688896170
查看更多评论
0.0547s