/ Vijos /

记录详情

Compile Error

foo.cc:3:14: error: too many decimal points in number
    3 | type x=array[1..2] of longint;
      |              ^~~~
foo.cc:71:73: warning: character constant too long for its type
   71 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]=0) then begin writeln('181818181818'); halt; end;
      |                                                                         ^~~~~~~~~~~~~~
foo.cc:1:1: error: 'program' does not name a type
    1 | program p1646;
      | ^~~~~~~
foo.cc:3:1: error: 'type' does not name a type
    3 | type x=array[1..2] of longint;
      | ^~~~
foo.cc:5:1: error: 'var' does not name a type
    5 | var str1,str2,str:string;
      | ^~~
foo.cc:7:1: error: 'k' does not name a type
    7 | k,a1,b1,c1,a2,b2,c2:longint;
      | ^
foo.cc:9:1: error: 'a' does not name a type
    9 | a,b,c:x;
      | ^
foo.cc:11:1: error: 'function' does not name a type; did you mean 'union'?
   11 | function firstcx(str:string;k:integer):boolean;
      | ^~~~~~~~
      | union
foo.cc:11:30: error: found ':' in nested-name-specifier, expected '::'
   11 | function firstcx(str:string;k:integer):boolean;
      |                              ^
      |                              ::
foo.cc:11:29: error: 'k' does not name a type
   11 | function firstcx(str:string;k:integer):boolean;
      |                             ^
foo.cc:13:1: error: 'var' does not name a type
   13 | var i:integer;
      | ^~~
foo.cc:15:1: error: 'begin' does not name a type
   15 | begin
      | ^~~~~
foo.cc:21:5: error: expected constructor, destructor, or type conversion before '(' token
   21 | exit(true);
      |     ^
foo.cc:23:1: error: 'end' does not name a type
   23 | end;
      | ^~~
foo.cc:25:1: error: 'function' does not name a type; did you mean 'union'?
   25 | function firstc(str:string):boolean;
      | ^~~~~~~~
      | union
foo.cc:27:1: error: 'var' does not name a type
   27 | var i:longint;
      | ^~~
foo.cc:29:1: error: 'begin' does not name a type
   29 | begin
      | ^~~~~
foo.cc:33:1: error: expected unqualified-id before 'while'
   33 | while (str[i]'+') and (str[i]'-') and (i0 then writeln(x1:0:5,' ',x2:0:5);
      | ^~~~~
foo.cc:35:1: error: expected unqualified-id before 'if'
   35 | if a=3 then if (str='x') or ((str='x') and (str='^')) then
      | ^~
foo.cc:39:41: error: 'xs' does not name a type
   39 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0;break; end
      |                                         ^~
foo.cc:39:47: error: expected unqualified-id before 'break'
   39 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0;break; end
      |                                               ^~~~~
foo.cc:39:54: error: 'end' does not name a type
   39 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0;break; end
      |                                                      ^~~
foo.cc:41:46: error: 'xs' does not name a type
   41 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0;break; end;
      |                                              ^~
foo.cc:41:52: error: expected unqualified-id before 'break'
   41 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0;break; end;
      |                                                    ^~~~~
foo.cc:41:59: error: 'end' does not name a type
   41 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0;break; end;
      |                                                           ^~~
foo.cc:43:1: error: 'end' does not name a type
   43 | end;
      | ^~~
foo.cc:45:1: error: 'end' does not name a type
   45 | end;
      | ^~~
foo.cc:47:4: error: expected constructor, destructor, or type conversion before '(' token
   47 | inc(i);
      |    ^
foo.cc:49:1: error: 'end' does not name a type
   49 | end;
      | ^~~
foo.cc:51:1: error: expected unqualified-id before 'if'
   51 | if xs0 then
      | ^~
foo.cc:57:41: error: 'xs' does not name a type
   57 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0; break; end
      |                                         ^~
foo.cc:57:48: error: expected unqualified-id before 'break'
   57 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0; break; end
      |                                                ^~~~~
foo.cc:57:55: error: 'end' does not name a type
   57 | if str[j]='+' then begin c[p]:=c[p]+xs; xs:=0; break; end
      |                                                       ^~~
foo.cc:59:46: error: 'xs' does not name a type
   59 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0; break; end;
      |                                              ^~
foo.cc:59:53: error: expected unqualified-id before 'break'
   59 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0; break; end;
      |                                                     ^~~~~
foo.cc:59:60: error: 'end' does not name a type
   59 | else if str[j]='-' then begin c[p]:=c[p]-xs; xs:=0; break; end;
      |                                                            ^~~
foo.cc:61:1: error: 'end' does not name a type
   61 | end;
      | ^~~
foo.cc:63:1: error: 'end' does not name a type
   63 | end;
      | ^~~
foo.cc:65:1: error: 'begin' does not name a type
   65 | begin
      | ^~~~~
foo.cc:69:7: error: expected constructor, destructor, or type conversion before '(' token
   69 | calstr(str1,1); calstr(str2,2);
      |       ^
foo.cc:69:23: error: expected constructor, destructor, or type conversion before '(' token
   69 | calstr(str1,1); calstr(str2,2);
      |                       ^
foo.cc:71:1: error: expected unqualified-id before 'if'
   71 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]=0) then begin writeln('181818181818'); halt; end;
      | ^~
foo.cc:71:90: error: 'halt' does not name a type
   71 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]=0) then begin writeln('181818181818'); halt; end;
      |                                                                                          ^~~~
foo.cc:71:96: error: 'end' does not name a type
   71 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]=0) then begin writeln('181818181818'); halt; end;
      |                                                                                                ^~~
foo.cc:73:1: error: expected unqualified-id before 'if'
   73 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]0) then begin writeln(0); halt; end;
      | ^~
foo.cc:73:76: error: 'halt' does not name a type
   73 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]0) then begin writeln(0); halt; end;
      |                                                                            ^~~~
foo.cc:73:82: error: 'end' does not name a type
   73 | if (a[1]-a[2]=0) and (b[1]-b[2]=0) and (c[1]-c[2]0) then begin writeln(0); halt; end;
      |                                                                                  ^~~
foo.cc:75:8: error: expected constructor, destructor, or type conversion before '(' token
   75 | calroot(a[1]-a[2],b[1]-b[2],c[1]-c[2]);
      |        ^
foo.cc:77:1: error: 'end' does not name a type
   77 | end.
      | ^~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1646 难题?水题?
语言
C++
递交时间
2022-01-09 11:19:15
评测时间
2022-01-09 11:19:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes