/ Vijos /

记录详情

Compile Error

foo.cc:5:12: error: too many decimal points in number
    5 | hash:array[0..97011] of boolean;
      |            ^~~~~~~~
foo.cc:15:7: warning: multi-character character constant [-Wmultichar]
   15 | write('YES');
      |       ^~~~~
foo.cc:25:7: warning: multi-character character constant [-Wmultichar]
   25 | write('NO');
      |       ^~~~
foo.cc:93:6: error: empty character constant
   93 | if a='' then continue;
      |      ^~
foo.cc:161:8: warning: character constant too long for its type
  161 | start:='Begin the Escape execution at the Break of Dawn';
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:1:1: error: 'ar' does not name a type; did you mean 'char'?
    1 | ar
      | ^~
      | char
foo.cc:5:5: error: found ':' in nested-name-specifier, expected '::'
    5 | hash:array[0..97011] of boolean;
      |     ^
      |     ::
foo.cc:5:1: error: 'hash' does not name a type
    5 | hash:array[0..97011] of boolean;
      | ^~~~
foo.cc:7:5: error: found ':' in nested-name-specifier, expected '::'
    7 | flag:boolean;
      |     ^
      |     ::
foo.cc:7:1: error: 'flag' does not name a type
    7 | flag:boolean;
      | ^~~~
foo.cc:9:1: error: 'procedure' does not name a type
    9 | procedure print(step:longint);
      | ^~~~~~~~~
foo.cc:11:1: error: 'begin' does not name a type
   11 | begin
      | ^~~~~
foo.cc:17:1: error: 'flag' does not name a type
   17 | flag:=true;
      | ^~~~
foo.cc:19:1: error: 'end' does not name a type
   19 | end;
      | ^~~
foo.cc:21:1: error: 'procedure' does not name a type
   21 | procedure print_n;
      | ^~~~~~~~~
foo.cc:23:1: error: 'begin' does not name a type
   23 | begin
      | ^~~~~
foo.cc:27:1: error: 'end' does not name a type
   27 | end;
      | ^~~
foo.cc:29:1: error: 'function' does not name a type; did you mean 'union'?
   29 | function checkhash(now:string):boolean;
      | ^~~~~~~~
      | union
foo.cc:31:1: error: 'var' does not name a type
   31 | var
      | ^~~
foo.cc:35:1: error: 'begin' does not name a type
   35 | begin
      | ^~~~~
foo.cc:39:1: error: expected unqualified-id before 'for'
   39 | for i:=1 to length(now) do
      | ^~~
foo.cc:45:1: error: 'g' does not name a type
   45 | g:=h and $f0000000;
      | ^
foo.cc:47:1: error: expected unqualified-id before 'if'
   47 | if g0 then
      | ^~
foo.cc:51:1: error: 'h' does not name a type
   51 | h:=h and (not g);
      | ^
foo.cc:53:1: error: 'end' does not name a type
   53 | end;
      | ^~~
foo.cc:55:1: error: 'h' does not name a type
   55 | h:=h mod 97011;
      | ^
foo.cc:57:1: error: expected unqualified-id before 'if'
   57 | if hash[h] then begin
      | ^~
foo.cc:61:5: error: expected constructor, destructor, or type conversion before '(' token
   61 | exit(false);
      |     ^
foo.cc:63:1: error: 'end' does not name a type
   63 | end;
      | ^~~
foo.cc:65:5: error: expected constructor, destructor, or type conversion before '(' token
   65 | exit(true);
      |     ^
foo.cc:67:1: error: 'end' does not name a type
   67 | end;
      | ^~~
foo.cc:69:1: error: 'function' does not name a type; did you mean 'union'?
   69 | function check(now:string):boolean;
      | ^~~~~~~~
      | union
foo.cc:71:1: error: 'var' does not name a type
   71 | var
      | ^~~
foo.cc:75:2: error: found ':' in nested-name-specifier, expected '::'
   75 | a:string;
      |  ^
      |  ::
foo.cc:75:1: error: 'a' does not name a type
   75 | a:string;
      | ^
foo.cc:77:1: error: 'begin' does not name a type
   77 | begin
      | ^~~~~
foo.cc:91:1: error: 'a' does not name a type
   91 | a:=copy(now,i+1,j-i-1);
      | ^
foo.cc:93:1: error: expected unqualified-id before 'if'
   93 | if a='' then continue;
      | ^~
foo.cc:95:1: error: expected unqualified-id before 'for'
   95 | for j:=1 to length(a) do
      | ^~~
foo.cc:101:1: error: expected unqualified-id before 'if'
  101 | if pos(a,start)=0 then
      | ^~
foo.cc:105:1: error: 'end' does not name a type
  105 | end;
      | ^~~
foo.cc:107:5: error: expected constructor, destructor, or type conversion before '(' token
  107 | exit(true);
      |     ^
foo.cc:109:1: error: 'end' does not name a type
  109 | end;
      | ^~~
foo.cc:111:1: error: 'procedure' does not name a type
  111 | procedure search(now:string;step:longint);
      | ^~~~~~~~~
foo.cc:111:33: error: found ':' in nested-name-specifier, expected '::'
  111 | procedure search(now:string;step:longint);
      |                                 ^
      |                                 ::
foo.cc:111:29: error: 'step' does not name a type
  111 | procedure search(now:string;step:longint);
      |                             ^~~~
foo.cc:113:1: error: 'var' does not name a type
  113 | var
      | ^~~
foo.cc:117:5: error: found ':' in nested-name-specifier, expected '::'
  117 | next:string;
      |     ^
      |     ::
foo.cc:117:1: error: 'next' does not name a type
  117 | next:string;
      | ^~~~
foo.cc:119:1: error: 'begin' does not name a type
  119 | begin
      | ^~~~~
foo.cc:123:1: error: expected unqualified-id before 'if'
  123 | if checkhash(now) then exit;
      | ^~
foo.cc:125:1: error: expected unqualified-id before 'if'
  125 | if not check(now) then exit;
      | ^~
foo.cc:127:1: error: expected unqualified-id before 'for'
  127 | for j:=1 to length(now) do
      | ^~~
foo.cc:149:7: error: expected constructor, destructor, or type conversion before '(' token
  149 | search(next,step+1);
      |       ^
foo.cc:151:1: error: 'end' does not name a type
  151 | end;
      | ^~~
foo.cc:153:1: error: 'end' does not name a type
  153 | end;
      | ^~~
foo.cc:155:1: error: 'begin' does not name a type
  155 | begin
      | ^~~~~
foo.cc:161:1: error: 'start' does not name a type
  161 | start:='Begin the Escape execution at the Break of Dawn';
      | ^~~~~
foo.cc:163:7: error: expected constructor, destructor, or type conversion before '(' token
  163 | readln(s);
      |       ^
foo.cc:165:7: error: expected constructor, destructor, or type conversion before '(' token
  165 | search(s,0);
      |       ^
foo.cc:167:1: error: expected unqualified-id before 'if'
  167 | if not flag then
      | ^~
foo.cc:171:1: error: 'flag' does not name a type
  171 | flag:=false;
      | ^~~~
foo.cc:173:1: error: 'end' does not name a type
  173 | end;
      | ^~~
foo.cc:175:1: error: 'end' does not name a type
  175 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

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