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

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

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

    我这个代码案例可以过,但为什么提交全是WA #include<bits/stdc++.h> using namespace std; int main(){ int a[100010],s[100010]; int n; cin >> n; for(int i=1;i<=n;i++){ cin >> a[i]; } for(int i=1;i<=n;i++){ s[i]=s[i-1]+a[i]; } int q,L,R; cin >> q; for(int i=1;i<=q;i++){ cin >> L >>R; cout << s[R] -s[L-1] << endl; } }

    userId_undefined

    天之神_复仇者_耈豕

    出道萌新时间刺客空间掌握者秩序白银
    29阅读
    16回复
    0点赞
  • 诡异(bushi

    为什么我们集训营发了同样的题,但我AC的代码过不了这题(

    userId_undefined

    Angel是Angle

    28阅读
    7回复
    1点赞
  • 为什么???

    #include <cstdio> using namespace std; const int N=2e5+10; int n,m; int a[N]; long long sum[N]; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&a[i]); sum[i]=sum[i-1]+a[i]; } scanf("%d",&m); for(int i=1;i<=m;i++){ int l,r; scanf("%d %d",&l,&r); printf("%ld\n",sum[r]-sum[l-1]); } return 0; }

    userId_undefined

    砸烂蒋老师的小黑屋哈哈哈

    7月全勤卷王空间掌握者I/O·IO入门者枚举·枚举小能手贪心·贪心尝试者循环·循环打卡人
    11阅读
    1回复
    0点赞
  • %70AC

    #include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAXN = 1e5 + 5; vector<int> sum(MAXN, 0); int main() { int n, q; cin >> n; vector<int> a(n); for (int i = 0; i < n; ++i) cin >> a[i]; }

    userId_undefined

    地表最强 AK IOI

    时空双修者快乐小狗
    7阅读
    0回复
    0点赞
首页