为什么编译错误
  • 板块灌水区
  • 楼主chishen
  • 当前回复17
  • 已保存回复17
  • 发布时间2023/8/17 20:51
  • 上次更新2023/11/3 03:02:30
查看原帖
为什么编译错误
939666
chishen楼主2023/8/17 20:51

疑惑不解,大胆发问

#include<bits/stdc++.h>
using namespace std;
const int N=1e6;
int a[N][N];
int main()
{
    int n,jin=0,yin=0,tong=0,tot=0;
    cin>>n;
    for(int i=1;i<=3;i++)
        for(int j=1;j<=n;j++)
            cin>>a[i][j];
    for(int i=1;i<=3;i++)
    {
        jin=0;
        yin=0;
        tong=0;
        for(int j=1;j<=n;j++)
        {
            jin+=a[1][j];
            yin+=a[2][j];
            tong+=a[3][j];
            tot+=a[i][j];
        }
    }
    cout<<jin<<" "<<yin<<" "<<tong<<" "<<tot;
    return 0;
}
2023/8/17 20:51
加载中...