您当前的位置: 首页 > 

HeartFireY

暂无认证

  • 2浏览

    0关注

    334博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

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

😀 算法标签:数学/思维

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

时间复杂度 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             
关注
打赏
1662600635
查看更多评论
0.0376s