/ Vijos /

记录详情

Compile Error

/in/foo.cc:2:19: error: too many decimal points in number
 var sum,map:array[0..1001,0..2001] of longint;
                   ^~~~~~~
/in/foo.cc:2:27: error: too many decimal points in number
 var sum,map:array[0..1001,0..2001] of longint;
                           ^~~~~~~
/in/foo.cc:3:12: error: too many decimal points in number
 spot:array[0..1000001] of int64;
            ^~~~~~~~~~
/in/foo.cc:4:9: error: too many decimal points in number
 g:array[0..1001,0..1001] of char;
         ^~~~~~~
/in/foo.cc:4:17: error: too many decimal points in number
 g:array[0..1001,0..1001] of char;
                 ^~~~~~~
/in/foo.cc:8:14: warning: multi-character character constant [-Wmultichar]
 assign(input,'b.in');
              ^~~~~~
/in/foo.cc:10:15: warning: character constant too long for its type
 assign(output,'b.out');
               ^~~~~~~
/in/foo.cc:1:1: error: 'program' does not name a type
 program exam;
 ^~~~~~~
/in/foo.cc:2:1: error: 'var' does not name a type
 var sum,map:array[0..1001,0..2001] of longint;
 ^~~
/in/foo.cc:3:5: error: found ':' in nested-name-specifier, expected '::'
 spot:array[0..1000001] of int64;
     ^
/in/foo.cc:3:1: error: 'spot' does not name a type
 spot:array[0..1000001] of int64;
 ^~~~
/in/foo.cc:4:2: error: found ':' in nested-name-specifier, expected '::'
 g:array[0..1001,0..1001] of char;
  ^
/in/foo.cc:4:1: error: 'g' does not name a type
 g:array[0..1001,0..1001] of char;
 ^
/in/foo.cc:5:1: error: 'n' does not name a type
 n,m,t,r,i,j,tot,vi,vj:longint;ans:int64;
 ^
/in/foo.cc:5:34: error: found ':' in nested-name-specifier, expected '::'
 n,m,t,r,i,j,tot,vi,vj:longint;ans:int64;
                                  ^
/in/foo.cc:5:31: error: 'ans' does not name a type
 n,m,t,r,i,j,tot,vi,vj:longint;ans:int64;
                               ^~~
/in/foo.cc:6:1: error: 'procedure' does not name a type
 procedure initfile;
 ^~~~~~~~~
/in/foo.cc:7:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:9:6: error: expected constructor, destructor, or type conversion before '(' token
 reset(input);
      ^
/in/foo.cc:10:7: error: expected constructor, destructor, or type conversion before '(' token
 assign(output,'b.out');
       ^
/in/foo.cc:11:8: error: expected constructor, destructor, or type conversion before '(' token
 rewrite(output);
        ^
/in/foo.cc:12:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:13:1: error: 'procedure' does not name a type
 procedure closefile;
 ^~~~~~~~~
/in/foo.cc:14:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:16:6: error: expected constructor, destructor, or type conversion before '(' token
 close(output);
      ^
/in/foo.cc:17:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:18:1: error: 'procedure' does not name a type
 procedure qs(l,r:longint);
 ^~~~~~~~~
/in/foo.cc:19:1: error: 'var' does not name a type
 var i,j:longint;x,tmp:int64;
 ^~~
/in/foo.cc:19:17: error: 'x' does not name a type
 var i,j:longint;x,tmp:int64;
                 ^
/in/foo.cc:20:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:21:6: error: 'j' does not name a type
 i:=l;j:=r;
      ^
/in/foo.cc:22:1: error: 'x' does not name a type
 x:=spot[(i+j) shr 1];
 ^
/in/foo.cc:23:1: error: 'repeat' does not name a type
 repeat
 ^~~~~~
/in/foo.cc:25:1: error: expected unqualified-id before 'while'
 while spot[j]<x do dec(j);
 ^~~~~
/in/foo.cc:26:1: error: expected unqualified-id before 'if'
 if i<=j then
 ^~
/in/foo.cc:28:14: error: 'spot' does not name a type
 tmp:=spot[i];spot[i]:=spot[j];spot[j]:=tmp;
              ^~~~
/in/foo.cc:28:31: error: 'spot' does not name a type
 tmp:=spot[i];spot[i]:=spot[j];spot[j]:=tmp;
                               ^~~~
/in/foo.cc:29:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(i);dec(j);
    ^
/in/foo.cc:29:11: error: expected constructor, destructor, or type conversion before '(' token
 inc(i);dec(j);
           ^
/in/foo.cc:30:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:31:1: error: 'until' does not name a type
 until i>j;
 ^~~~~
/in/foo.cc:32:1: error: expected unqualified-id before 'if'
 if i<r then qs(i,r);
 ^~
/in/foo.cc:33:1: error: expected unqualified-id before 'if'
 if l<j then qs(l,j);
 ^~
/in/foo.cc:34:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:35:1: error: 'function' does not name a type
 function min(x,y:longint):longint;
 ^~~~~~~~
/in/foo.cc:36:1: error: 'begin' does not name a type
 begin if x<y then exit(x) else exit(y);end;
 ^~~~~
/in/foo.cc:36:40: error: 'end' does not name a type
 begin if x<y then exit(x) else exit(y);end;
                                        ^~~
/in/foo.cc:37:1: error: 'function' does not name a type
 function max(x,y:longint):longint;
 ^~~~~~~~
/in/foo.cc:38:1: error: 'begin' does not name a type
 begin if x>y then exit(x) else exit(y);end;
 ^~~~~
/in/foo.cc:38:40: error: 'end' does not name a type
 begin if x>y then exit(x) else exit(y);end;
                                        ^~~
/in/foo.cc:39:1: error: 'procedure' does not name a type
 procedure initdata;
 ^~~~~~~~~
/in/foo.cc:40:1: error: 'var' does not name a type
 var i,j,k,h:longint;
 ^~~
/in/foo.cc:41:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:43:9: error: expected constructor, destructor, or type conversion before '(' token
 fillchar(sum,sizeof(sum),0);
         ^
/in/foo.cc:44:1: error: expected unqualified-id before 'for'
 for i:=1 to n do
 ^~~
/in/foo.cc:48:11: error: 'vj' does not name a type
 vi:=i-j+m;vj:=i+j-1;
           ^~
/in/foo.cc:49:5: error: expected constructor, destructor, or type conversion before '(' token
 read(g[i,j]);
     ^
/in/foo.cc:50:1: error: expected unqualified-id before 'if'
 if g[i,j]='O' then
 ^~
/in/foo.cc:52:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:53:1: error: 'readln' does not name a type
 readln;
 ^~~~~~
/in/foo.cc:54:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:55:1: error: expected unqualified-id before 'for'
 for i:=1 to n+m-1 do
 ^~~
/in/foo.cc:59:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:60:1: error: expected unqualified-id before 'for'
 for i:=1 to n do
 ^~~
/in/foo.cc:65:1: error: 'vi' does not name a type
 vi:=i-j+m;vj:=i+j-1;
 ^~
/in/foo.cc:65:11: error: 'vj' does not name a type
 vi:=i-j+m;vj:=i+j-1;
           ^~
/in/foo.cc:67:1: error: 'spot' does not name a type
 spot[tot]:=sum[min(vi+r,n+m-1),min(vj+r,n+m-1)]-
 ^~~~
/in/foo.cc:72:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:73:3: error: expected constructor, destructor, or type conversion before '(' token
 qs(1,tot);
   ^
/in/foo.cc:74:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:75:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:78:1: error: 'ans' does not name a type
 ans:=0;
 ^~~
/in/foo.cc:79:1: error: expected unqualified-id before 'for'
 for i:=1 to t do
 ^~~
/in/foo.cc:82:1: error: 'end' does not name a type
 end;
 ^~~
/in/foo.cc:83:8: error: expected constructor, destructor, or type conversion before '(' token
 writeln(ans);
        ^
/in/foo.cc:85:1: error: 'end' does not name a type
 end.
 ^~~

信息

递交者
类型
递交
题目
P1877 小岛的塔防游戏
语言
C++
递交时间
2021-05-05 17:58:21
评测时间
2021-05-05 17:58:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes