/ Vijos /

记录详情

Compile Error

foo.cc:9:12: error: too many decimal points in number
    9 | next:array[0..maxn] of point;
      |            ^~~~~~~
foo.cc:10:15: error: too many decimal points in number
   10 | s,n,w,e:array[0..maxn,0..maxn] of longint;
      |               ^~~~~~~
foo.cc:10:23: error: too many decimal points in number
   10 | s,n,w,e:array[0..maxn,0..maxn] of longint;
      |                       ^~~~~~~
foo.cc:11:9: error: too many decimal points in number
   11 | t:array[1..maxn] of longint;
      |         ^~~~~~~
foo.cc:12:13: error: too many decimal points in number
   12 | m,ans:array[0..maxn,0..maxn,0..1] of boolean;
      |             ^~~~~~~
foo.cc:12:21: error: too many decimal points in number
   12 | m,ans:array[0..maxn,0..maxn,0..1] of boolean;
      |                     ^~~~~~~
foo.cc:12:29: error: too many decimal points in number
   12 | m,ans:array[0..maxn,0..maxn,0..1] of boolean;
      |                             ^~~~
foo.cc:1:7: error: 'maxn' does not name a type
    1 | const maxn=1002;
      |       ^~~~
foo.cc:2:1: error: 'type' does not name a type; did you mean 'typedef'?
    2 | type point=^node;
      | ^~~~
      | typedef
foo.cc:3:1: error: 'node' does not name a type
    3 | node=record
      | ^~~~
foo.cc:5:5: error: found ':' in nested-name-specifier, expected '::'
    5 | next:point;
      |     ^
      |     ::
foo.cc:5:1: error: 'next' does not name a type
    5 | next:point;
      | ^~~~
foo.cc:6:1: error: 'end' does not name a type
    6 | end;
      | ^~~
foo.cc:7:1: error: 'var' does not name a type
    7 | var i,j,nn,x,y,sum,k:longint;
      | ^~~
foo.cc:8:1: error: 'c' does not name a type
    8 | c:char;
      | ^
foo.cc:9:5: error: found ':' in nested-name-specifier, expected '::'
    9 | next:array[0..maxn] of point;
      |     ^
      |     ::
foo.cc:9:1: error: 'next' does not name a type
    9 | next:array[0..maxn] of point;
      | ^~~~
foo.cc:10:1: error: 's' does not name a type
   10 | s,n,w,e:array[0..maxn,0..maxn] of longint;
      | ^
foo.cc:11:2: error: found ':' in nested-name-specifier, expected '::'
   11 | t:array[1..maxn] of longint;
      |  ^
      |  ::
foo.cc:11:1: error: 't' does not name a type
   11 | t:array[1..maxn] of longint;
      | ^
foo.cc:12:1: error: 'm' does not name a type
   12 | m,ans:array[0..maxn,0..maxn,0..1] of boolean;
      | ^
foo.cc:13:2: error: found ':' in nested-name-specifier, expected '::'
   13 | p:point;
      |  ^
      |  ::
foo.cc:13:1: error: 'p' does not name a type
   13 | p:point;
      | ^
foo.cc:14:1: error: 'procedure' does not name a type
   14 | procedure add(x,sum:longint);
      | ^~~~~~~~~
foo.cc:15:1: error: 'begin' does not name a type
   15 | begin
      | ^~~~~
foo.cc:19:1: error: 'x' does not name a type
   19 | x:=x+x and -x;
      | ^
foo.cc:20:1: error: 'end' does not name a type
   20 | end;
      | ^~~
foo.cc:21:1: error: 'end' does not name a type
   21 | end;
      | ^~~
foo.cc:22:1: error: 'function' does not name a type; did you mean 'union'?
   22 | function find(x:longint):longint;
      | ^~~~~~~~
      | union
foo.cc:23:1: error: 'var' does not name a type
   23 | var s:longint;
      | ^~~
foo.cc:24:1: error: 'begin' does not name a type
   24 | begin
      | ^~~~~
foo.cc:26:1: error: expected unqualified-id before 'while'
   26 | while (x>0) do
      | ^~~~~
foo.cc:29:1: error: 'x' does not name a type
   29 | x:=x-x and -x;
      | ^
foo.cc:30:1: error: 'end' does not name a type
   30 | end;
      | ^~~
foo.cc:31:5: error: expected constructor, destructor, or type conversion before '(' token
   31 | exit(s);
      |     ^
foo.cc:32:1: error: 'end' does not name a type
   32 | end;
      | ^~~
foo.cc:33:1: error: 'function' does not name a type; did you mean 'union'?
   33 | function min(a,b:longint):longint;
      | ^~~~~~~~
      | union
foo.cc:34:1: error: 'begin' does not name a type
   34 | begin
      | ^~~~~
foo.cc:36:1: error: 'end' does not name a type
   36 | end;
      | ^~~
foo.cc:37:1: error: 'begin' does not name a type
   37 | begin
      | ^~~~~
foo.cc:39:1: error: expected unqualified-id before 'for'
   39 | for i:=1 to nn+1 do
      | ^~~
foo.cc:44:1: error: expected unqualified-id before 'case'
   44 | case c of
      | ^~~~
foo.cc:46:1: error: expected unqualified-id before '|'
   46 | '|':m[i-1,(j+1) div 2,1]:=true;
      | ^~~
foo.cc:47:1: error: 'end' does not name a type
   47 | end;
      | ^~~
foo.cc:48:1: error: 'end' does not name a type
   48 | end;
      | ^~~
foo.cc:49:1: error: 'readln' does not name a type
   49 | readln;
      | ^~~~~~
foo.cc:50:1: error: 'end' does not name a type
   50 | end;
      | ^~~
foo.cc:51:1: error: expected unqualified-id before 'for'
   51 | for i:=1 to nn+1 do
      | ^~~
foo.cc:55:1: error: expected unqualified-id before 'if'
   55 | if m[i-1,j,1] then n[i,j]:=n[i-1,j]+1;
      | ^~
foo.cc:56:1: error: 'end' does not name a type
   56 | end;
      | ^~~
foo.cc:57:1: error: expected unqualified-id before 'for'
   57 | for i:=nn+1 downto 1 do
      | ^~~
foo.cc:61:1: error: expected unqualified-id before 'if'
   61 | if m[i,j,1] then s[i,j]:=s[i+1,j]+1;
      | ^~
foo.cc:62:1: error: 'end' does not name a type
   62 | end;
      | ^~~
foo.cc:63:4: error: expected constructor, destructor, or type conversion before '(' token
   63 | inc(nn);
      |    ^
foo.cc:64:1: error: expected unqualified-id before 'for'
   64 | for i:=1 to nn*2 do
      | ^~~
foo.cc:68:7: error: 'y' does not name a type
   68 | x:=1; y:=i;
      |       ^
foo.cc:69:1: error: 'end' does not name a type
   69 | end else
      | ^~~
foo.cc:71:10: error: 'y' does not name a type
   71 | x:=i-nn; y:=nn;
      |          ^
foo.cc:72:1: error: 'end' does not name a type
   72 | end;
      | ^~~
foo.cc:73:9: error: expected constructor, destructor, or type conversion before '(' token
   73 | fillchar(next,sizeof(next),0);
      |         ^
foo.cc:74:9: error: expected constructor, destructor, or type conversion before '(' token
   74 | fillchar(t,sizeof(t),0);
      |         ^
foo.cc:75:1: error: expected unqualified-id before 'while'
   75 | while (x<=nn) and (y>=1) do
      | ^~~~~
foo.cc:78:1: error: expected unqualified-id before 'while'
   78 | while (p<>nil) do
      | ^~~~~
foo.cc:81:1: error: 'p' does not name a type
   81 | p:=p^.next;
      | ^
foo.cc:82:1: error: 'end' does not name a type
   82 | end;
      | ^~~
foo.cc:83:1: error: expected unqualified-id before 'if'
   83 | if w[x,y]>n[x,y] then
      | ^~
foo.cc:88:1: error: expected unqualified-id before 'if'
   88 | if w[x,y]<n[x,y] then
      | ^~
foo.cc:92:1: error: 'end' does not name a type
   92 | end;
      | ^~~
foo.cc:93:4: error: expected constructor, destructor, or type conversion before '(' token
   93 | add(x,1);
      |    ^
foo.cc:94:1: error: expected unqualified-id before 'new'
   94 | new(p);
      | ^~~
foo.cc:95:1: error: 'k' does not name a type
   95 | k:=x+min(s[x,y],e[x,y])+1;
      | ^
foo.cc:96:1: error: 'p' does not name a type
   96 | p^.x:=x; p^.next:=next[k];
      | ^
foo.cc:96:10: error: 'p' does not name a type
   96 | p^.x:=x; p^.next:=next[k];
      |          ^
foo.cc:97:1: error: 'next' does not name a type
   97 | next[k]:=p;
      | ^~~~
foo.cc:98:4: error: expected constructor, destructor, or type conversion before '(' token
   98 | inc(x); dec(y);
      |    ^
foo.cc:98:12: error: expected constructor, destructor, or type conversion before '(' token
   98 | inc(x); dec(y);
      |            ^
foo.cc:99:1: error: 'end' does not name a type
   99 | end;
      | ^~~
foo.cc:100:1: error: expected unqualified-id before 'if'
  100 | if i<=nn then
      | ^~
foo.cc:102:7: error: 'y' does not name a type
  102 | x:=i; y:=1;
      |       ^
foo.cc:103:1: error: 'end' does not name a type
  103 | end else
      | ^~~
foo.cc:105:8: error: 'y' does not name a type
  105 | x:=nn; y:=i-nn+1;
      |        ^
foo.cc:106:1: error: 'end' does not name a type
  106 | end;
      | ^~~
foo.cc:107:9: error: expected constructor, destructor, or type conversion before '(' token
  107 | fillchar(next,sizeof(next),0);
      |         ^
foo.cc:108:9: error: expected constructor, destructor, or type conversion before '(' token
  108 | fillchar(t,sizeof(t),0);
      |         ^
foo.cc:109:1: error: expected unqualified-id before 'while'
  109 | while (x>=1) and (y<=nn) do
      | ^~~~~
foo.cc:112:1: error: expected unqualified-id before 'while'
  112 | while (p<>nil) do
      | ^~~~~
foo.cc:115:1: error: 'p' does not name a type
  115 | p:=p^.next;
      | ^
foo.cc:116:1: error: 'end' does not name a type
  116 | end;
      | ^~~
foo.cc:117:1: error: expected unqualified-id before 'if'
  117 | if e[x,y]<s[x,y] then
      | ^~
foo.cc:121:1: error: 'end' does not name a type
  121 | end else if e[x,y]>s[x,y] then
      | ^~~
foo.cc:125:1: error: 'end' does not name a type
  125 | end;
      | ^~~
foo.cc:126:4: error: expected constructor, destructor, or type conversion before '(' token
  126 | add(x,1);
      |    ^
foo.cc:127:1: error: 'k' does not name a type
  127 | k:=x-min(n[x,y],w[x,y])-1;
      | ^
foo.cc:128:1: error: expected unqualified-id before 'new'
  128 | new(p);
      | ^~~
foo.cc:129:1: error: 'p' does not name a type
  129 | p^.x:=x; p^.next:=next[k];
      | ^
foo.cc:129:10: error: 'p' does not name a type
  129 | p^.x:=x; p^.next:=next[k];
      |          ^
foo.cc:130:1: error: 'next' does not name a type
  130 | next[k]:=p;
      | ^~~~
foo.cc:131:4: error: expected constructor, destructor, or type conversion before '(' token
  131 | dec(x); inc(y);
      |    ^
foo.cc:131:12: error: expected constructor, destructor, or type conversion before '(' token
  131 | dec(x); inc(y);
      |            ^
foo.cc:132:1: error: 'end' does not name a type
  132 | end;
      | ^~~
foo.cc:133:1: error: 'end' does not name a type
  133 | end;
      | ^~~
foo.cc:134:1: error: 'sum' does not name a type
  134 | sum:=0;
      | ^~~
foo.cc:135:1: error: expected unqualified-id before 'for'
  135 | for i:=1 to nn do
      | ^~~
foo.cc:139:1: error: expected unqualified-id before 'if'
  139 | if ans[i,j][1] then inc(sum);
      | ^~
foo.cc:140:1: error: 'end' does not name a type
  140 | end;
      | ^~~
foo.cc:141:8: error: expected constructor, destructor, or type conversion before '(' token
  141 | writeln(sum);
      |        ^
foo.cc:142:1: error: 'end' does not name a type
  142 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1618 正方形内的计数
语言
C++
递交时间
2023-08-13 18:51:59
评测时间
2023-08-13 18:51:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes