/ Vijos /

记录详情

Compile Error

foo.cc:7:9: error: too many decimal points in number
 a:array[0..300001] of node;
         ^~~~~~~~~
foo.cc:8:9: error: too many decimal points in number
 b:array[1..100000] of string;
         ^~~~~~~~~
foo.cc:9:30: error: too many decimal points in number
 c,num,order,leng,ll,rr:array[0..100001] of longint;
                              ^~~~~~~~~
foo.cc:1:1: error: 'type' does not name a type
 type
 ^~~~
foo.cc:4:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:6:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:8:2: error: found ':' in nested-name-specifier, expected '::'
 b:array[1..100000] of string;
  ^
foo.cc:8:1: error: 'b' does not name a type
 b:array[1..100000] of string;
 ^
foo.cc:9:1: error: 'c' does not name a type
 c,num,order,leng,ll,rr:array[0..100001] of longint;
 ^
foo.cc:10:1: error: 'n' does not name a type
 n,i,s,j:longint;
 ^
foo.cc:11:3: error: found ':' in nested-name-specifier, expected '::'
 st:string;
   ^
foo.cc:11:1: error: 'st' does not name a type
 st:string;
 ^~
foo.cc:12:5: error: found ':' in nested-name-specifier, expected '::'
 code:integer;
     ^
foo.cc:12:1: error: 'code' does not name a type
 code:integer;
 ^~~~
foo.cc:14:1: error: 'procedure' does not name a type
 procedure sort(l,r:longint);
 ^~~~~~~~~
foo.cc:15:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:17:1: error: 'x' does not name a type
 x,yy:string;
 ^
foo.cc:18:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:19:7: error: 'j' does not name a type
 i:=l; j:=r; x:=b[(l+r) div 2];
       ^
foo.cc:19:13: error: 'x' does not name a type
 i:=l; j:=r; x:=b[(l+r) div 2];
             ^
foo.cc:20:1: error: 'repeat' does not name a type
 repeat
 ^~~~~~
foo.cc:22:1: error: expected unqualified-id before 'while'
 while x<b[j] do dec(j);
 ^~~~~
foo.cc:23:1: error: expected unqualified-id before 'if'
 if not(i>j) then
 ^~
foo.cc:25:12: error: 'num' does not name a type; did you mean 'enum'?
 y:=num[i]; num[i]:=num[j]; num[j]:=y;
            ^~~
            enum
foo.cc:25:28: error: 'num' does not name a type; did you mean 'enum'?
 y:=num[i]; num[i]:=num[j]; num[j]:=y;
                            ^~~
                            enum
foo.cc:26:1: error: 'y' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
 ^
foo.cc:26:14: error: 'order' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
              ^~~~~
foo.cc:26:34: error: 'order' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
                                  ^~~~~
foo.cc:27:1: error: 'y' does not name a type
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
 ^
foo.cc:27:13: error: 'leng' does not name a type; did you mean 'long'?
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
             ^~~~
             long
foo.cc:27:31: error: 'leng' does not name a type; did you mean 'long'?
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
                               ^~~~
                               long
foo.cc:28:1: error: 'yy' does not name a type
 yy:=b[i]; b[i]:=b[j]; b[j]:=yy;
 ^~
foo.cc:28:11: error: 'b' does not name a type
 yy:=b[i]; b[i]:=b[j]; b[j]:=yy;
           ^
foo.cc:28:23: error: 'b' does not name a type
 yy:=b[i]; b[i]:=b[j]; b[j]:=yy;
                       ^
foo.cc:29:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(i); dec(j);
    ^
foo.cc:29:12: error: expected constructor, destructor, or type conversion before '(' token
 inc(i); dec(j);
            ^
foo.cc:30:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:31:1: error: 'until' does not name a type
 until i>j;
 ^~~~~
foo.cc:32:1: error: expected unqualified-id before 'if'
 if l<j then
 ^~
foo.cc:34:1: error: expected unqualified-id before 'if'
 if i<r then
 ^~
foo.cc:36:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:38:1: error: 'procedure' does not name a type
 procedure sort1(l,r:longint);
 ^~~~~~~~~
foo.cc:39:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
foo.cc:41:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:42:7: error: 'j' does not name a type
 i:=l; j:=r; x:=num[(l+r) div 2];
       ^
foo.cc:42:13: error: 'x' does not name a type
 i:=l; j:=r; x:=num[(l+r) div 2];
             ^
foo.cc:43:1: error: 'repeat' does not name a type
 repeat
 ^~~~~~
foo.cc:45:1: error: expected unqualified-id before 'while'
 while x<num[j] do dec(j);
 ^~~~~
foo.cc:46:1: error: expected unqualified-id before 'if'
 if not(i>j) then
 ^~
foo.cc:48:12: error: 'num' does not name a type; did you mean 'enum'?
 y:=num[i]; num[i]:=num[j]; num[j]:=y;
            ^~~
            enum
foo.cc:48:28: error: 'num' does not name a type; did you mean 'enum'?
 y:=num[i]; num[i]:=num[j]; num[j]:=y;
                            ^~~
                            enum
foo.cc:49:1: error: 'y' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
 ^
foo.cc:49:14: error: 'order' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
              ^~~~~
foo.cc:49:34: error: 'order' does not name a type
 y:=order[i]; order[i]:=order[j]; order[j]:=y;
                                  ^~~~~
foo.cc:50:1: error: 'y' does not name a type
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
 ^
foo.cc:50:13: error: 'leng' does not name a type; did you mean 'long'?
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
             ^~~~
             long
foo.cc:50:31: error: 'leng' does not name a type; did you mean 'long'?
 y:=leng[i]; leng[i]:=leng[j]; leng[j]:=y;
                               ^~~~
                               long
foo.cc:51:1: error: 'y' does not name a type
 y:=c[i]; c[i]:=c[j]; c[j]:=y;
 ^
foo.cc:51:10: error: 'c' does not name a type
 y:=c[i]; c[i]:=c[j]; c[j]:=y;
          ^
foo.cc:51:22: error: 'c' does not name a type
 y:=c[i]; c[i]:=c[j]; c[j]:=y;
                      ^
foo.cc:52:4: error: expected constructor, destructor, or type conversion before '(' token
 inc(i); dec(j);
    ^
foo.cc:52:12: error: expected constructor, destructor, or type conversion before '(' token
 inc(i); dec(j);
            ^
foo.cc:53:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:54:1: error: 'until' does not name a type
 until i>j;
 ^~~~~
foo.cc:55:1: error: expected unqualified-id before 'if'
 if l<j then
 ^~
foo.cc:57:1: error: expected unqualified-id before 'if'
 if i<r then
 ^~
foo.cc:59:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:61:1: error: 'procedure' does not name a type
 procedure build(k,left,right:longint);
 ^~~~~~~~~
foo.cc:62:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:63:15: error: 'a' does not name a type
 a[k].l:=left; a[k].r:=right; a[k].m:=(left+right) div 2;
               ^
foo.cc:63:30: error: 'a' does not name a type
 a[k].l:=left; a[k].r:=right; a[k].m:=(left+right) div 2;
                              ^
foo.cc:64:1: error: 'a' does not name a type
 a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].rlen;
 ^
foo.cc:64:26: error: 'a' does not name a type
 a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].rlen;
                          ^
foo.cc:64:48: error: 'a' does not name a type
 a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].rlen;
                                                ^
foo.cc:65:1: error: expected unqualified-id before 'if'
 if left=right then exit;
 ^~
foo.cc:66:6: error: expected constructor, destructor, or type conversion before '(' token
 build(k shl 1,left,a[k].m); build(k shl 1+1,a[k].m+1,right);
      ^
foo.cc:66:34: error: expected constructor, destructor, or type conversion before '(' token
 build(k shl 1,left,a[k].m); build(k shl 1+1,a[k].m+1,right);
                                  ^
foo.cc:67:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:69:1: error: 'function' does not name a type; did you mean 'union'?
 function max(t1,t2:longint):longint;
 ^~~~~~~~
 union
foo.cc:70:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:72:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:74:1: error: 'function' does not name a type; did you mean 'union'?
 function find(k,len:longint):longint;
 ^~~~~~~~
 union
foo.cc:75:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:77:1: error: expected unqualified-id before 'if'
 if a[k shl 1].maxlen>=len then exit(find(k shl 1,len));
 ^~
foo.cc:78:1: error: expected unqualified-id before 'if'
 if a[k shl 1].rlen+a[k shl 1+1].llen>=len then exit(a[k shl 1].r-a[k shl 1].rlen+1);
 ^~
foo.cc:79:1: error: expected unqualified-id before 'if'
 if a[k shl 1+1].maxlen>=len then exit(find(k shl 1+1,len));
 ^~
foo.cc:80:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:82:1: error: 'procedure' does not name a type
 procedure change(k,left,right:longint);
 ^~~~~~~~~
foo.cc:83:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:85:26: error: 'a' does not name a type
 then begin a[k].llen:=0; a[k].rlen:=0; a[k].maxlen:=0; exit; end;
                          ^
foo.cc:85:40: error: 'a' does not name a type
 then begin a[k].llen:=0; a[k].rlen:=0; a[k].maxlen:=0; exit; end;
                                        ^
foo.cc:85:56: error: 'exit' does not name a type
 then begin a[k].llen:=0; a[k].rlen:=0; a[k].maxlen:=0; exit; end;
                                                        ^~~~
foo.cc:85:62: error: 'end' does not name a type; did you mean 'enum'?
 then begin a[k].llen:=0; a[k].rlen:=0; a[k].maxlen:=0; exit; end;
                                                              ^~~
                                                              enum
foo.cc:86:1: error: expected unqualified-id before 'if'
 if left>a[k].m then change(k shl 1+1,left,right) else
 ^~
foo.cc:88:42: error: expected constructor, destructor, or type conversion before '(' token
 begin change(k shl 1,left,a[k].m); change(k shl 1+1,a[k].m+1,right); end;
                                          ^
foo.cc:88:70: error: 'end' does not name a type; did you mean 'enum'?
 begin change(k shl 1,left,a[k].m); change(k shl 1+1,a[k].m+1,right); end;
                                                                      ^~~
                                                                      enum
foo.cc:89:1: error: expected unqualified-id before 'if'
 if a[k shl 1].llen=a[k].m-a[k].l+1
 ^~
foo.cc:92:1: error: expected unqualified-id before 'if'
 if a[k shl 1+1].rlen=a[k].r-a[k].m
 ^~
foo.cc:95:1: error: 'a' does not name a type
 a[k].maxlen:=max(max(a[k shl 1].maxlen,a[k shl 1+1].maxlen),a[k shl 1].rlen+a[k shl 1+1].llen);
 ^
foo.cc:96:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:98:1: error: 'procedure' does not name a type
 procedure change1(k,left,right:longint);
 ^~~~~~~~~
foo.cc:99:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:101:37: error: 'a' does not name a type
 then begin a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].llen; exit; end;
                                     ^
foo.cc:101:59: error: 'a' does not name a type
 then begin a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].llen; exit; end;
                                                           ^
foo.cc:101:83: error: 'exit' does not name a type
 then begin a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].llen; exit; end;
                                                                                   ^~~~
foo.cc:101:89: error: 'end' does not name a type; did you mean 'enum'?
 then begin a[k].llen:=right-left+1; a[k].rlen:=a[k].llen; a[k].maxlen:=a[k].llen; exit; end;
                                                                                         ^~~
                                                                                         enum
foo.cc:102:1: error: expected unqualified-id before 'if'
 if left>a[k].m then change1(k shl 1+1,left,right) else
 ^~
foo.cc:104:44: error: expected constructor, destructor, or type conversion before '(' token
 begin change1(k shl 1,left,a[k].m); change1(k shl 1+1,a[k].m+1,right); end;
                                            ^
foo.cc:104:72: error: 'end' does not name a type; did you mean 'enum'?
 begin change1(k shl 1,left,a[k].m); change1(k shl 1+1,a[k].m+1,right); end;
                                                                        ^~~
                                                                        enum
foo.cc:105:1: error: expected unqualified-id before 'if'
 if a[k shl 1].llen=a[k].m-a[k].l+1
 ^~
foo.cc:108:1: error: expected unqualified-id before 'if'
 if a[k shl 1+1].rlen=a[k].r-a[k].m
 ^~
foo.cc:111:1: error: 'a' does not name a type
 a[k].maxlen:=max(max(a[k shl 1].maxlen,a[k shl 1+1].maxlen),a[k shl 1].rlen+a[k shl 1+1].llen);
 ^
foo.cc:112:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:114:1: error: 'begin' does not name a type
 begin
 ^~~~~
foo.cc:116:1: error: expected unqualified-id before 'for'
 for i:=1 to n do
 ^~~
foo.cc:119:1: error: expected unqualified-id before 'delete'
 delete(st,length(st)-1,2);
 ^~~~~~
foo.cc:120:1: error: expected unqualified-id before 'if'
 if st[length(st)] in ['0'..'9']
 ^~
foo.cc:123:14: error: 'j' does not name a type
 order[i]:=1; j:=length(st);
              ^
foo.cc:124:1: error: expected unqualified-id before 'while'
 while st[j-1]<>'(' do dec(j);
 ^~~~~
foo.cc:125:4: error: expected constructor, destructor, or type conversion before '(' token
 val(copy(st,j,length(st)-j+1),leng[i],code);
    ^
foo.cc:126:1: error: 'b' does not name a type
 b[i]:=copy(st,1,j-9);
 ^
foo.cc:127:1: error: 'end' does not name a type; did you mean 'enum'?
 end
 ^~~
 enum
foo.cc:132:14: error: 'b' does not name a type
 order[i]:=3; b[i]:=copy(st,7,length(st)-6);
              ^
foo.cc:133:1: error: 'end' does not name a type; did you mean 'enum'?
 end
 ^~~
 enum
foo.cc:136:14: error: 'b' does not name a type
 order[i]:=2; b[i]:=copy(st,6,length(st)-5);
              ^
foo.cc:137:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:138:1: error: 'num' does not name a type; did you mean 'enum'?
 num[i]:=i;
 ^~~
 enum
foo.cc:139:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:141:5: error: expected constructor, destructor, or type conversion before '(' token
 sort(1,n);
     ^
foo.cc:142:1: error: 's' does not name a type
 s:=1; c[1]:=1;
 ^
foo.cc:142:7: error: 'c' does not name a type
 s:=1; c[1]:=1;
       ^
foo.cc:143:1: error: expected unqualified-id before 'for'
 for i:=2 to n do
 ^~~
foo.cc:146:20: error: 'c' does not name a type
 else begin inc(s); c[i]:=s; end;
                    ^
foo.cc:146:29: error: 'end' does not name a type; did you mean 'enum'?
 else begin inc(s); c[i]:=s; end;
                             ^~~
                             enum
foo.cc:147:6: error: expected constructor, destructor, or type conversion before '(' token
 sort1(1,n);
      ^
foo.cc:149:6: error: expected constructor, destructor, or type conversion before '(' token
 build(1,1,100000);
      ^
foo.cc:150:1: error: expected unqualified-id before 'for'
 for i:=1 to s do ll[i]:=0;
 ^~~
foo.cc:151:1: error: expected unqualified-id before 'for'
 for i:=1 to n do
 ^~~
foo.cc:154:48: error: expected unqualified-id before 'continue'
 if a[1].maxlen<leng[i] then begin ll[c[i]]:=0; continue; end;
                                                ^~~~~~~~
foo.cc:154:58: error: 'end' does not name a type; did you mean 'enum'?
 if a[1].maxlen<leng[i] then begin ll[c[i]]:=0; continue; end;
                                                          ^~~
                                                          enum
foo.cc:155:1: error: 'll' does not name a type
 ll[c[i]]:=find(1,leng[i]); rr[c[i]]:=ll[c[i]]+leng[i]-1;
 ^~
foo.cc:155:28: error: 'rr' does not name a type
 ll[c[i]]:=find(1,leng[i]); rr[c[i]]:=ll[c[i]]+leng[i]-1;
                            ^~
foo.cc:156:7: error: expected constructor, destructor, or type conversion before '(' token
 change(1,ll[c[i]],rr[c[i]]);
       ^
foo.cc:157:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:158:1: error: expected unqualified-id before numeric constant
 2:if ll[c[i]]>0
 ^
foo.cc:161:31: error: 'll' does not name a type
 change1(1,ll[c[i]],rr[c[i]]); ll[c[i]]:=0;
                               ^~
foo.cc:162:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:163:1: error: expected unqualified-id before numeric constant
 3:writeln(ll[c[i]]);
 ^
foo.cc:164:1: error: 'end' does not name a type; did you mean 'enum'?
 end;
 ^~~
 enum
foo.cc:165:1: error: 'end' does not name a type; did you mean 'enum'?
 end.
 ^~~
 enum
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1227 拯救世界-程序设计
语言
C++
递交时间
2021-03-25 21:25:31
评测时间
2021-03-25 21:25:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes