Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
122654 | 刘嘉柚 | 序列变换 | C++ | 运行出错 | 0 | 92 MS | 4160 KB | 406 | 2024-01-22 16:13:33 |
#include<bits/stdc++.h> using namespace std; const int N=1e6+5; int a[N]; int main() { int n,m,dos,x,y,I; scanf("%d%d",&n,&m); for(int i=1;i<=n;i++){ scanf("%d",&a[i]); } for(int i=1;i<=m;i++){ scanf("%d",&dos); if(dos==1){ scanf("%d%d",&x,&y); for(int k=1;k*x<=n;k++) a[k*n]+=y; } else if(dos==2){ scanf("%d",&I); printf("%d\n",&a[I]); } } return 0; }