/ Vijos /

记录详情

Compile Error

foo.cc:2:11: error: too many decimal points in number
 p,f:array[1..3000]of integer;
           ^~~~~~~
foo.cc:1:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:3:1: error: 'n' does not name a type
 n,lp,lf,j:integer;
 ^
foo.cc:5:1: error: 'procedure' does not name a type
 procedure times;
 ^~~~~~~~~
foo.cc:6:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:8:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:10:1: error: expected unqualified-id before 'for'
 for i:=1to lp do
 ^~~
foo.cc:13:1: error: 'x' does not name a type
 x:=f[i]div 10;
 ^
foo.cc:14:1: error: 'f' does not name a type
 f[i]:=f[i] mod 10;
 ^
foo.cc:15:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:16:1: error: expected unqualified-id before 'while'
 while x>0do
 ^~~~~
foo.cc:19:1: error: 'f' does not name a type
 f[i]:=x mod 10;
 ^
foo.cc:20:1: error: 'x' does not name a type
 x:=x div 10;
 ^
foo.cc:21:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:22:1: error: 'lf' does not name a type
 lf:=i;
 ^~
foo.cc:23:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:25:1: error: 'procedure' does not name a type
 procedure deec;
 ^~~~~~~~~
foo.cc:26:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:28:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:30:1: error: 'k' does not name a type
 k:=1;
 ^
foo.cc:31:1: error: expected unqualified-id before 'while'
 while f[k]<0do
 ^~~~~
foo.cc:34:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(f[k],10);
    ^
foo.cc:35:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(k);
    ^
foo.cc:36:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:37:1: error: expected unqualified-id before 'if'
 if f[lf]=0then dec(lf);
 ^~
foo.cc:38:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:40:1: error: 'procedure' does not name a type
 procedure innc;
 ^~~~~~~~~
foo.cc:41:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:43:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:45:1: error: 'k' does not name a type
 k:=1;
 ^
foo.cc:46:1: error: expected unqualified-id before 'while'
 while f[k]=10do
 ^~~~~
foo.cc:49:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(f[k+1]);
    ^
foo.cc:50:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(k);
    ^
foo.cc:51:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:52:1: error: expected unqualified-id before 'if'
 if f[lf+1]>0then inc(lf);
 ^~
foo.cc:53:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:55:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:57:1: error: expected unqualified-id before 'if'
 if n=1 then begin writeln(0); halt; end
 ^~
foo.cc:57:31: error: 'halt' does not name a type
 if n=1 then begin writeln(0); halt; end
                               ^~~~
foo.cc:57:37: error: 'end' does not name a type; did you mean 'enum'?
 if n=1 then begin writeln(0); halt; end
                                     ^~~
                                     enum
foo.cc:58:36: error: 'halt' does not name a type
 else if n=2 then begin writeln(1); halt; end;
                                    ^~~~
foo.cc:58:42: error: 'end' does not name a type; did you mean 'enum'?
 else if n=2 then begin writeln(1); halt; end;
                                          ^~~
                                          enum
foo.cc:59:1: error: 'p' does not name a type
 p[1]:=1; lp:=1;
 ^
foo.cc:59:10: error: 'lp' does not name a type
 p[1]:=1; lp:=1;
          ^~
foo.cc:60:1: error: expected unqualified-id before 'for'
 for j:=3 to n do
 ^~~
foo.cc:63:1: error: expected unqualified-id before 'if'
 if j mod 2=1then deec
 ^~
foo.cc:65:1: error: 'p' does not name a type
 p:=f; lp:=lf;
 ^
foo.cc:65:7: error: 'lp' does not name a type
 p:=f; lp:=lf;
       ^~
foo.cc:66:9: error: expected constructor, destructor, or type conversion before '(' token
 fillchar(f,sizeof(f),0);
         ^
foo.cc:67:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:68:1: error: expected unqualified-id before 'for'
 for j:=lp downto 1 do write(p[j]);
 ^~~
foo.cc:69:1: error: 'end' does not name a type; did you mean 'enum'?
 end.
 ^~~
 enum
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1687 细菌总数
语言
C++
递交时间
2021-04-08 20:24:31
评测时间
2021-04-08 20:24:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes