acgo题库
  • 首页
  • 题库
  • 学习
  • 天梯
  • 备赛

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
  • 资讯
  • 竞赛
  • 讨论
  • 团队
  • 商城
登录
注册
题目详情提交记录(0)
  • NOIP没有这道题

    NOIP没有这道题

    userId_undefined
    龙
    78阅读
    2回复
    2点赞
  • 不会吧

    思路是对的,例子也测试对了,反正干啥都对了,就是一测试就。。。。。。 WA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    userId_undefined
    ぱぴぷぴぷぴぱ
    34阅读
    3回复
    1点赞
  • A54.求和 | 《已尽力,力竭了》

    #include<bits/stdc++.h> #include<vector> using namespace std; const int man = 114514; const int maxn = 100007; int ans, c[man], num[man]; vector<int> s[man][2]; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, m; cin >> n >> m; for(int i = 1; i <= n; i++) cin >> num[i]; for(int i = 1; i <= n; i++) cin >> c[i], s[i][i&1].push_back(i); for(int f = 1; f <= m; f++){ for(int j = 0; j < 2; j++){ auto &v = s[f][j]; if(v.size() < 2) continue; int cnt = 0, sb = 0, sb2 = 0, ssbb = 0; for(int a:v){ int sbsb = num[a]; ans = (ans + a * sbsb % maxn * cnt + a * sb2 + sbsb * sb + ssbb) % maxn; cnt++, sb = (sb + a) % maxn, sb2 = (sb2 + sbsb) % maxn, ssbb = (ssbb + a * sbsb) % maxn; } } } cout << ans % man; return 0; }

    userId_undefined
    KARDS幻象--英爷没血了
    倔强青铜贪心·贪心尝试者时间刺客字符串·魔法使ASCII炼金师维度操控者
    4阅读
    0回复
    0点赞
暂无数据

提交答案之后,这里将显示提交结果~

首页