acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 3

    userId_undefined

    周幽王

    倔强青铜
    11阅读
    0回复
    0点赞
  • 8888

    userId_undefined

    周幽王

    倔强青铜
    8阅读
    0回复
    0点赞
  • 6

    userId_undefined

    周幽王

    倔强青铜
    8阅读
    0回复
    0点赞
  • 114514

    userId_undefined

    瀚高祖

    空间掌握者秩序白银
    3阅读
    0回复
    0点赞
  • 78

    userId_undefined

    瀚高祖

    空间掌握者秩序白银
    3阅读
    0回复
    0点赞
  • 7

    userId_undefined

    周幽王

    倔强青铜
    2阅读
    0回复
    0点赞
  • 2

    #include <iostream> #include <vector> using namespace std; const int MOD = 998244353; int count_pairs(int n, int k) { int res = 0; for (int x = 0; x <= n; ++x) { for (int y = x + 1; y <= n; ++y) { int diff = x ^ y; int cnt = 0; while (diff) { cnt += diff & 1; diff >>= 1; } if (cnt <= k) { res = (res + 1) % MOD; } } } return res; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); }

    userId_undefined

    周幽王

    倔强青铜
    2阅读
    0回复
    0点赞
  • 7891

    userId_undefined

    瀚高祖

    空间掌握者秩序白银
    1阅读
    0回复
    0点赞
首页