/ Vijos /

记录详情

Compile Error

foo.cc:3:12: warning: character constant too long for its type
    3 | aim:string='Begin the Escape execution at the Break of Dawn';
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:7:15: error: too many decimal points in number
    7 | aimn,sn:array[0..127]of longint;
      |               ^~~~~~
foo.cc:8:10: error: too many decimal points in number
    8 | re:array[0..97013]of boolean;
      |          ^~~~~~~~
foo.cc:12:9: warning: multi-character character constant [-Wmultichar]
   12 | writeln('0 0');
      |         ^~~~~
foo.cc:18:9: warning: multi-character character constant [-Wmultichar]
   18 | writeln('1 ',nc);
      |         ^~~~
foo.cc:52:9: error: too many decimal points in number
   52 | p:array[0..31]of longint;
      |         ^~~~~
foo.cc:105:9: warning: multi-character character constant [-Wmultichar]
  105 | writeln('1 0');
      |         ^~~~~
foo.cc:3:4: error: found ':' in nested-name-specifier, expected '::'
    3 | aim:string='Begin the Escape execution at the Break of Dawn';
      |    ^
      |    ::
foo.cc:3:1: error: 'aim' does not name a type
    3 | aim:string='Begin the Escape execution at the Break of Dawn';
      | ^~~
foo.cc:4:1: error: 'var' does not name a type
    4 | var
      | ^~~
foo.cc:6:1: error: 'i' does not name a type
    6 | i,nc,no,nw:longint;
      | ^
foo.cc:7:1: error: 'aimn' does not name a type
    7 | aimn,sn:array[0..127]of longint;
      | ^~~~
foo.cc:8:3: error: found ':' in nested-name-specifier, expected '::'
    8 | re:array[0..97013]of boolean;
      |   ^
      |   ::
foo.cc:8:1: error: 're' does not name a type
    8 | re:array[0..97013]of boolean;
      | ^~
foo.cc:10:1: error: 'procedure' does not name a type
   10 | procedure noans;
      | ^~~~~~~~~
foo.cc:11:1: error: 'begin' does not name a type
   11 | begin
      | ^~~~~
foo.cc:13:1: error: 'halt' does not name a type
   13 | halt;
      | ^~~~
foo.cc:14:1: error: 'end' does not name a type
   14 | end;
      | ^~~
foo.cc:16:1: error: 'procedure' does not name a type
   16 | procedure outans;
      | ^~~~~~~~~
foo.cc:17:1: error: 'begin' does not name a type
   17 | begin
      | ^~~~~
foo.cc:19:1: error: 'halt' does not name a type
   19 | halt;
      | ^~~~
foo.cc:20:1: error: 'end' does not name a type
   20 | end;
      | ^~~
foo.cc:22:1: error: 'function' does not name a type; did you mean 'union'?
   22 | function change(s:string;c,o,w:integer):string;
      | ^~~~~~~~
      | union
foo.cc:22:26: error: 'c' does not name a type
   22 | function change(s:string;c,o,w:integer):string;
      |                          ^
foo.cc:23:1: error: 'begin' does not name a type
   23 | begin
      | ^~~~~
foo.cc:25:1: error: 'end' does not name a type
   25 | end;
      | ^~~
foo.cc:27:1: error: 'function' does not name a type; did you mean 'union'?
   27 | function hash(s:string):qword;
      | ^~~~~~~~
      | union
foo.cc:28:1: error: 'var' does not name a type
   28 | var
      | ^~~
foo.cc:30:2: error: found ':' in nested-name-specifier, expected '::'
   30 | a:qword;
      |  ^
      |  ::
foo.cc:30:1: error: 'a' does not name a type
   30 | a:qword;
      | ^
foo.cc:31:1: error: 'begin' does not name a type
   31 | begin
      | ^~~~~
foo.cc:33:1: error: expected unqualified-id before 'for'
   33 | for i:=1 to length(s) do
      | ^~~
foo.cc:36:1: error: expected unqualified-id before 'if'
   36 | if s[i]=' '
      | ^~
foo.cc:45:1: error: 'a' does not name a type
   45 | a:=(a+j)mod 97011;
      | ^
foo.cc:46:1: error: 'end' does not name a type
   46 | end;
      | ^~~
foo.cc:47:5: error: expected constructor, destructor, or type conversion before '(' token
   47 | exit(a);
      |     ^
foo.cc:48:1: error: 'end' does not name a type
   48 | end;
      | ^~~
foo.cc:50:1: error: 'procedure' does not name a type
   50 | procedure search(st:string);
      | ^~~~~~~~~
foo.cc:51:1: error: 'var' does not name a type
   51 | var
      | ^~~
foo.cc:53:1: error: 'c' does not name a type
   53 | c,o,w,len,i,k:longint;
      | ^
foo.cc:55:1: error: 'function' does not name a type; did you mean 'union'?
   55 | function connect(a,b,c,d:integer):boolean;
      | ^~~~~~~~
      | union
foo.cc:56:1: error: 'begin' does not name a type
   56 | begin
      | ^~~~~
foo.cc:58:1: error: expected unqualified-id before 'if'
   58 | if pos(copy(st,a,b-a+1)+copy(st,c,d-c+1),aim)=0
      | ^~
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:67:1: error: expected unqualified-id before 'if'
   67 | if re[hash(st)] then exit;
      | ^~
foo.cc:68:1: error: 'len' does not name a type
   68 | len:=length(st);
      | ^~~
foo.cc:69:1: error: expected unqualified-id before 'if'
   69 | if len<=47 then exit;
      | ^~
foo.cc:70:1: error: 're' does not name a type
   70 | re[hash(st)]:=true;
      | ^~
foo.cc:71:1: error: 'k' does not name a type
   71 | k:=0;
      | ^
foo.cc:72:1: error: expected unqualified-id before 'for'
   72 | for i:=1 to len do
      | ^~~
foo.cc:77:1: error: 'p' does not name a type
   77 | p[k]:=i;
      | ^
foo.cc:78:1: error: 'end' does not name a type
   78 | end;
      | ^~~
foo.cc:79:1: error: expected unqualified-id before 'if'
   79 | if copy(st,1,p[1]-1)<>copy(aim,1,p[1]-1) then exit;
      | ^~
foo.cc:80:1: error: expected unqualified-id before 'if'
   80 | if copy(st,p[k]+1,len-p[k])<>copy(aim,p[k]+48-len,len-p[k]) then exit;
      | ^~
foo.cc:81:1: error: expected unqualified-id before 'if'
   81 | if (st[p[1]]<>'C')or(st[p[k]]<>'W') then exit;
      | ^~
foo.cc:82:1: error: 'p' does not name a type
   82 | p[0]:=0;
      | ^
foo.cc:83:1: error: 'p' does not name a type
   83 | p[k+1]:=len+1;
      | ^
foo.cc:84:1: error: expected unqualified-id before 'for'
   84 | for o:=2 to k-1 do
      | ^~~
foo.cc:98:1: error: 'end' does not name a type
   98 | end;
      | ^~~
foo.cc:100:1: error: 'begin' does not name a type
  100 | begin
      | ^~~~~
foo.cc:102:1: error: expected unqualified-id before 'if'
  102 | if s=aim
      | ^~
foo.cc:106:1: error: 'halt' does not name a type
  106 | halt;
      | ^~~~
foo.cc:107:1: error: 'end' does not name a type
  107 | end;
      | ^~~
foo.cc:108:1: error: expected unqualified-id before 'for'
  108 | for i:=1 to length(s) do inc(sn[ord(s[i])]);
      | ^~~
foo.cc:109:1: error: expected unqualified-id before 'for'
  109 | for i:=1 to 47 do inc(aimn[ord(aim[i])]);
      | ^~~
foo.cc:110:1: error: expected unqualified-id before 'for'
  110 | for i:=0 to 127 do
      | ^~~
foo.cc:127:1: error: 'end' does not name a type
  127 | end;
      | ^~~
foo.cc:128:1: error: expected unqualified-id before 'if'
  128 | if(nc<>no) or (nc<>nw) then noans;
      | ^~
foo.cc:129:7: error: expected constructor, destructor, or type conversion before '(' token
  129 | search(s);
      |       ^
foo.cc:130:1: error: 'noans' does not name a type
  130 | noans;
      | ^~~~~
foo.cc:131:1: error: 'end' does not name a type
  131 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1031 奶牛加密术
语言
C++
递交时间
2021-12-12 15:30:17
评测时间
2021-12-12 15:30:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes