/ Vijos /

记录详情

Compile Error

./Main.java:1: error: class, interface, enum, or record expected
var
^
./Main.java:3: error: class, interface, enum, or record expected
usedn,usedm:array[1..10] of boolean;
^
./Main.java:4: error: class, interface, enum, or record expected
fn,fm:array[0..5000,1..10] of byte;
^
./Main.java:5: error: class, interface, enum, or record expected
sfn,sfm:array[0..5000] of boolean;
^
./Main.java:6: error: class, interface, enum, or record expected
dn,dm:array[0..5000] of byte;
^
./Main.java:7: error: class, interface, enum, or record expected
sumn,summ:integer;
^
./Main.java:8: error: class, interface, enum, or record expected
numn,numm:byte;
^
./Main.java:9: error: class, interface, enum, or record expected
min:integer;
^
./Main.java:10: error: class, interface, enum, or record expected
x:byte;
^
./Main.java:11: error: class, interface, enum, or record expected
ans:integer;
^
./Main.java:12: error: class, interface, enum, or record expected
i,j,k:integer;
^
./Main.java:13: error: class, interface, enum, or record expected
left:integer;
^
./Main.java:14: error: class, interface, enum, or record expected
begin sumn:=0; summ:=0;ans:=0;
^
./Main.java:14: error: class, interface, enum, or record expected
begin sumn:=0; summ:=0;ans:=0;
               ^
./Main.java:14: error: class, interface, enum, or record expected
begin sumn:=0; summ:=0;ans:=0;
                       ^
./Main.java:15: error: class, interface, enum, or record expected
read(numn); for i:=1 to numn do begin read(n[i]); sumn:=sumn+n[i]; end;
^
./Main.java:15: error: class, interface, enum, or record expected
read(numn); for i:=1 to numn do begin read(n[i]); sumn:=sumn+n[i]; end;
            ^
./Main.java:15: error: class, interface, enum, or record expected
read(numn); for i:=1 to numn do begin read(n[i]); sumn:=sumn+n[i]; end;
                                                  ^
./Main.java:15: error: class, interface, enum, or record expected
read(numn); for i:=1 to numn do begin read(n[i]); sumn:=sumn+n[i]; end;
                                                                   ^
./Main.java:16: error: class, interface, enum, or record expected
read(numm); for i:=1 to numm do begin read(m[i]); summ:=summ+m[i]; end;
^
./Main.java:16: error: class, interface, enum, or record expected
read(numm); for i:=1 to numm do begin read(m[i]); summ:=summ+m[i]; end;
            ^
./Main.java:16: error: class, interface, enum, or record expected
read(numm); for i:=1 to numm do begin read(m[i]); summ:=summ+m[i]; end;
                                                  ^
./Main.java:16: error: class, interface, enum, or record expected
read(numm); for i:=1 to numm do begin read(m[i]); summ:=summ+m[i]; end;
                                                                   ^
./Main.java:17: error: class, interface, enum, or record expected
left:=numn+numm;
^
./Main.java:18: error: class, interface, enum, or record expected
fillchar(usedn,sizeof(usedn),false);
^
./Main.java:19: error: class, interface, enum, or record expected
fillchar(usedm,sizeof(usedm),false);
^
./Main.java:20: error: class, interface, enum, or record expected
if summ<>sumn then writeln(-1)
^
./Main.java:24: error: class, interface, enum, or record expected
fillchar(sfm,sizeof(sfm),false);
^
./Main.java:25: error: class, interface, enum, or record expected
for i:=1 to sumn do begin dn[i]:=200; dm[i]:=200; end;
^
./Main.java:25: error: class, interface, enum, or record expected
for i:=1 to sumn do begin dn[i]:=200; dm[i]:=200; end;
                                      ^
./Main.java:25: error: class, interface, enum, or record expected
for i:=1 to sumn do begin dn[i]:=200; dm[i]:=200; end;
                                                  ^
./Main.java:26: error: class, interface, enum, or record expected
dn[0]:=0;
^
./Main.java:27: error: class, interface, enum, or record expected
dm[0]:=0;
^
./Main.java:28: error: class, interface, enum, or record expected
min:=500;
^
./Main.java:29: error: class, interface, enum, or record expected
sfn[0]:=true;
^
./Main.java:30: error: class, interface, enum, or record expected
sfm[0]:=true;
^
./Main.java:31: error: class, interface, enum, or record expected
for i:=1 to numn do begin
^
./Main.java:36: error: class, interface, enum, or record expected
fn[j+n[i],k]:=fn[j,k];end;
                      ^
./Main.java:37: error: class, interface, enum, or record expected
fn[j+n[i],dn[j]+1]:=i;
^
./Main.java:38: error: class, interface, enum, or record expected
dn[j+n[i]]:=dn[j]+1;
^
./Main.java:39: error: class, interface, enum, or record expected
sfn[j+n[i]]:=true;
^
./Main.java:40: error: class, interface, enum, or record expected
end;
^
./Main.java:41: error: class, interface, enum, or record expected
end;end;
^
./Main.java:41: error: class, interface, enum, or record expected
end;end;
    ^
./Main.java:42: error: class, interface, enum, or record expected
for i:=1 to numm do begin
^
./Main.java:47: error: class, interface, enum, or record expected
fm[j+m[i],k]:=fm[j,k];end;
                      ^
./Main.java:48: error: class, interface, enum, or record expected
fm[j+m[i],dm[j]+1]:=i;
^
./Main.java:49: error: class, interface, enum, or record expected
dm[j+m[i]]:=dm[j]+1;
^
./Main.java:50: error: class, interface, enum, or record expected
sfm[j+m[i]]:=true;
^
./Main.java:51: error: class, interface, enum, or record expected
end;
^
./Main.java:52: error: class, interface, enum, or record expected
end;end;
^
./Main.java:52: error: class, interface, enum, or record expected
end;end;
    ^
./Main.java:53: error: class, interface, enum, or record expected
for i:=sumn downto 1 do
^
./Main.java:54: error: class, interface, enum, or record expected
if dn[i]+dm[i]<min then begin min:=dn[i]+dm[i]; x:=i;end;
                                                ^
./Main.java:54: error: class, interface, enum, or record expected
if dn[i]+dm[i]<min then begin min:=dn[i]+dm[i]; x:=i;end;
                                                     ^
./Main.java:55: error: class, interface, enum, or record expected
ans:=ans+min-2;
^
./Main.java:56: error: class, interface, enum, or record expected
for i:=1 to dn[x] do usedn[fn[x,i]]:=true;
^
./Main.java:57: error: class, interface, enum, or record expected
for i:=1 to dm[x] do usedm[fm[x,i]]:=true;
^
./Main.java:58: error: class, interface, enum, or record expected
left:=left-min;
^
./Main.java:59: error: class, interface, enum, or record expected
end;
^
./Main.java:60: error: class, interface, enum, or record expected
writeln(ans);
^
./Main.java:61: error: class, interface, enum, or record expected
end;
^
./Main.java:62: error: class, interface, enum, or record expected
end.
^
63 errors
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1758 硬币
语言
Java
递交时间
2023-05-21 14:08:48
评测时间
2023-05-21 14:08:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes