/ Vijos /

记录详情

Compile Error

foo.cc:1:1: error: 'var' does not name a type
    1 | var
      | ^~~
foo.cc:5:5: error: found ':' in nested-name-specifier, expected '::'
    5 | now : array [ 1 .. 1000000 , 1 .. 2 ] of longint;
      |     ^
      |     ::
foo.cc:5:1: error: 'now' does not name a type
    5 | now : array [ 1 .. 1000000 , 1 .. 2 ] of longint;
      | ^~~
foo.cc:7:5: error: found ':' in nested-name-specifier, expected '::'
    7 | vis : array [ 1 .. 1000 , 1 .. 1000 ] of boolean;
      |     ^
      |     ::
foo.cc:7:1: error: 'vis' does not name a type
    7 | vis : array [ 1 .. 1000 , 1 .. 1000 ] of boolean;
      | ^~~
foo.cc:9:5: error: found ':' in nested-name-specifier, expected '::'
    9 | tot : array [ 1 .. 1001 ] of longint;
      |     ^
      |     ::
foo.cc:9:1: error: 'tot' does not name a type
    9 | tot : array [ 1 .. 1001 ] of longint;
      | ^~~
foo.cc:11:1: error: 'n' does not name a type
   11 | n , m , ans : longint;
      | ^
foo.cc:13:1: error: 'procedure' does not name a type
   13 | procedure main;
      | ^~~~~~~~~
foo.cc:15:1: error: 'var' does not name a type
   15 | var
      | ^~~
foo.cc:19:1: error: 'begin' does not name a type
   19 | begin
      | ^~~~~
foo.cc:31:1: error: expected unqualified-id before 'if'
   31 | if vis[i , j] then
      | ^~
foo.cc:37:17: error: expected constructor, destructor, or type conversion before '(' token
   37 | inc(tot[i]); dec(tot[right[i , j]]);
      |                 ^
foo.cc:39:1: error: 'now' does not name a type
   39 | now[k , 1] := i; now[k , 2] := right[i , j];
      | ^~~
foo.cc:39:18: error: 'now' does not name a type
   39 | now[k , 1] := i; now[k , 2] := right[i , j];
      |                  ^~~
foo.cc:41:1: error: 'end' does not name a type
   41 | end
      | ^~~
foo.cc:45:18: error: 't' does not name a type
   45 | s := now[k , 1]; t := now[k , 2];
      |                  ^
foo.cc:47:4: error: expected constructor, destructor, or type conversion before '(' token
   47 | dec(tot); inc(tot[t]);
      |    ^
foo.cc:47:14: error: expected constructor, destructor, or type conversion before '(' token
   47 | dec(tot); inc(tot[t]);
      |              ^
foo.cc:49:1: error: expected unqualified-id before 'if'
   49 | if (i >= s) and (i < t) then t := i;
      | ^~
foo.cc:51:1: error: expected unqualified-id before 'if'
   51 | if i < s then begin t := s; s := i; end;
      | ^~
foo.cc:51:29: error: 's' does not name a type
   51 | if i < s then begin t := s; s := i; end;
      |                             ^
foo.cc:51:37: error: 'end' does not name a type
   51 | if i < s then begin t := s; s := i; end;
      |                                     ^~~
foo.cc:53:1: error: expected unqualified-id before 'if'
   53 | if t > right[i , j] then t := right[i , j];
      | ^~
foo.cc:55:4: error: expected constructor, destructor, or type conversion before '(' token
   55 | inc(tot); dec(tot[t]);
      |    ^
foo.cc:55:14: error: expected constructor, destructor, or type conversion before '(' token
   55 | inc(tot); dec(tot[t]);
      |              ^
foo.cc:57:1: error: 'now' does not name a type
   57 | now[k , 1] := s; now[k , 2] := t;
      | ^~~
foo.cc:57:18: error: 'now' does not name a type
   57 | now[k , 1] := s; now[k , 2] := t;
      |                  ^~~
foo.cc:59:1: error: 'end' does not name a type
   59 | end;
      | ^~~
foo.cc:61:1: error: 'sum' does not name a type
   61 | sum[i , j] := sum[i-1 , j] + tot[i];
      | ^~~
foo.cc:63:1: error: 'end' does not name a type
   63 | end;
      | ^~~
foo.cc:65:1: error: 'end' does not name a type
   65 | end;
      | ^~~
foo.cc:67:1: error: expected unqualified-id before 'for'
   67 | for i := 1 to n do
      | ^~~
foo.cc:75:1: error: 'end' does not name a type
   75 | end;
      | ^~~
foo.cc:77:8: error: expected constructor, destructor, or type conversion before '(' token
   77 | writeln(ans);
      |        ^
foo.cc:79:1: error: 'end' does not name a type
   79 | end;
      | ^~~
foo.cc:81:1: error: 'procedure' does not name a type
   81 | procedure init;
      | ^~~~~~~~~
foo.cc:83:1: error: 'var' does not name a type
   83 | var
      | ^~~
foo.cc:87:1: error: 'begin' does not name a type
   87 | begin
      | ^~~~~
foo.cc:91:1: error: expected unqualified-id before 'for'
   91 | for i := 1 to n do
      | ^~~
foo.cc:95:1: error: expected unqualified-id before 'for'
   95 | for j := 1 to m do
      | ^~~
foo.cc:103:1: error: expected unqualified-id before 'if'
  103 | if (now[k , 2] < j) then
      | ^~
foo.cc:107:18: error: 'now' does not name a type
  107 | now[k , 1] := i; now[k , 2] := j;
      |                  ^~~
foo.cc:109:1: error: 'vis' does not name a type
  109 | vis[i , j] := true;
      | ^~~
foo.cc:111:1: error: 'right' does not name a type
  111 | right[i , j] := n+1;
      | ^~~~~
foo.cc:113:1: error: expected unqualified-id before 'continue'
  113 | continue;
      | ^~~~~~~~
foo.cc:115:1: error: 'end' does not name a type
  115 | end;
      | ^~~
foo.cc:117:1: error: expected unqualified-id before 'if'
  117 | if right[now[k , 1] , j] = n+1 then
      | ^~
foo.cc:123:1: error: 'end' does not name a type
  123 | end;
      | ^~~
foo.cc:125:1: error: 'end' does not name a type
  125 | end;
      | ^~~
foo.cc:127:9: error: expected constructor, destructor, or type conversion before '(' token
  127 | fillchar(now , sizeof(now) , 0);
      |         ^
foo.cc:129:1: error: 'end' does not name a type
  129 | end;
      | ^~~
foo.cc:131:1: error: 'begin' does not name a type
  131 | begin
      | ^~~~~
foo.cc:135:1: error: 'main' does not name a type
  135 | main;
      | ^~~~
foo.cc:137:1: error: 'end' does not name a type
  137 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1664 真-资源勘察
语言
C++
递交时间
2023-08-18 10:19:07
评测时间
2023-08-18 10:19:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes