记录详情

Compile Error

/in/Main.java:1: error: illegal character: '#'
#include <cstdio>
^
/in/Main.java:1: error: class, interface, or enum expected
#include <cstdio>
         ^
/in/Main.java:2: error: illegal character: '#'
#include <math.h>
^
/in/Main.java:4: error: class, interface, or enum expected
int N,M,K,p[21][21],x,y;
^
/in/Main.java:5: error: class, interface, or enum expected
void search()
^
/in/Main.java:8: error: class, interface, or enum expected
    for(i=1;i<=M;i++)
    ^
/in/Main.java:8: error: class, interface, or enum expected
    for(i=1;i<=M;i++)
            ^
/in/Main.java:8: error: class, interface, or enum expected
    for(i=1;i<=M;i++)
                 ^
/in/Main.java:9: error: class, interface, or enum expected
            for(j=1;j<=N;j++)
                    ^
/in/Main.java:9: error: class, interface, or enum expected
            for(j=1;j<=N;j++)
                         ^
/in/Main.java:10: error: class, interface, or enum expected
                if(p[i][j]>max) {max=p[i][j];x=i;y=j;}
                                             ^
/in/Main.java:10: error: class, interface, or enum expected
                if(p[i][j]>max) {max=p[i][j];x=i;y=j;}
                                                 ^
/in/Main.java:10: error: class, interface, or enum expected
                if(p[i][j]>max) {max=p[i][j];x=i;y=j;}
                                                     ^
/in/Main.java:15: error: class, interface, or enum expected
    long long ans=0;
    ^
/in/Main.java:16: error: class, interface, or enum expected
    scanf("%d%d%d",&M,&N,&K);
    ^
/in/Main.java:17: error: class, interface, or enum expected
    for(i=1;i<=M;i++) for(j=1;j<=N;j++) scanf("%d",&p[i][j]);
    ^
/in/Main.java:17: error: class, interface, or enum expected
    for(i=1;i<=M;i++) for(j=1;j<=N;j++) scanf("%d",&p[i][j]);
            ^
/in/Main.java:17: error: class, interface, or enum expected
    for(i=1;i<=M;i++) for(j=1;j<=N;j++) scanf("%d",&p[i][j]);
                 ^
/in/Main.java:17: error: class, interface, or enum expected
    for(i=1;i<=M;i++) for(j=1;j<=N;j++) scanf("%d",&p[i][j]);
                              ^
/in/Main.java:17: error: class, interface, or enum expected
    for(i=1;i<=M;i++) for(j=1;j<=N;j++) scanf("%d",&p[i][j]);
                                   ^
/in/Main.java:18: error: class, interface, or enum expected
    search();
    ^
/in/Main.java:19: error: class, interface, or enum expected
    if(K>2*x)
    ^
/in/Main.java:22: error: class, interface, or enum expected
        while(1)
        ^
/in/Main.java:25: error: class, interface, or enum expected
            ans+=p[x][y];
            ^
/in/Main.java:26: error: class, interface, or enum expected
            p[x][y]=0;
            ^
/in/Main.java:27: error: class, interface, or enum expected
            x1=x,y1=y;
            ^
/in/Main.java:28: error: class, interface, or enum expected
            search();
            ^
/in/Main.java:29: error: class, interface, or enum expected
            if(K>=abs(x-x1)+abs(y-y1)+1+x) K-=abs(x-x1)+abs(y-y1);
            ^
/in/Main.java:30: error: class, interface, or enum expected
            else break;
            ^
/in/Main.java:31: error: class, interface, or enum expected
        }
        ^
/in/Main.java:34: error: class, interface, or enum expected
    return 0;
    ^
/in/Main.java:35: error: class, interface, or enum expected
}
^
32 errors

信息

递交者
类型
递交
题目
P1128 花生采摘
语言
Java
递交时间
2021-01-17 09:47:52
评测时间
2021-01-17 09:47:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes