AZ,为什么会CE???

P1216 [USACO1.5] [IOI1994]数字三角形 Number Triangles

Rn_Lamsuly @ 2020-10-29 21:12:39

RT

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int num[1005][1005]={0},f[1005][1005]={0};
    int n;
    scanf("%d",&n);
    for(register int i=1;i<=n;++i)
    {
        for(register int j=1;j<=i;++j);
        {
            scanf("%d",&num[i][j]);
        }
    }
    f[1][1]=num[1][1];
    for(register int i=2;i<=n;++i)
    {
        for(register int j=1;j<=n;++j)
        {
            f[i][j]=max(f[i-1][j],f[i-1][j-1]);
        }
    }
    sort(f[n]+1,f[n]+n+1);
    cout<<f[n][n];
    return 0;
}

by Graphcity @ 2020-10-29 21:16:47

for 循环那里多了个分号


by Graphcity @ 2020-10-29 21:17:15

第 10 行 @肾小囊190350


by Rn_Lamsuly @ 2020-10-29 21:18:40

@舒熙皓 啊这。。。orz。谢谢奆佬了


by Rn_Lamsuly @ 2020-10-29 21:22:17

orz我还少加了一个num[i][j]


|