/ Vijos /

记录详情

Compile Error

foo.cc:1:13: error: too many decimal points in number
    1 | var x:array[0..200]of real;
      |             ^~~~~~
foo.cc:2:9: error: too many decimal points in number
    2 | a:array[0..200,0..201]of real;
      |         ^~~~~~
foo.cc:2:16: error: too many decimal points in number
    2 | a:array[0..200,0..201]of real;
      |                ^~~~~~
foo.cc:1:1: error: 'var' does not name a type
    1 | var x:array[0..200]of real;
      | ^~~
foo.cc:2:2: error: found ':' in nested-name-specifier, expected '::'
    2 | a:array[0..200,0..201]of real;
      |  ^
      |  ::
foo.cc:2:1: error: 'a' does not name a type
    2 | a:array[0..200,0..201]of real;
      | ^
foo.cc:3:2: error: found ':' in nested-name-specifier, expected '::'
    3 | n:longint;
      |  ^
      |  ::
foo.cc:3:1: error: 'n' does not name a type
    3 | n:longint;
      | ^
foo.cc:4:1: error: 'procedure' does not name a type
    4 | procedure initial;
      | ^~~~~~~~~
foo.cc:5:1: error: 'var' does not name a type
    5 | var i,j:longint;
      | ^~~
foo.cc:6:1: error: 'begin' does not name a type
    6 | begin
      | ^~~~~
foo.cc:8:1: error: expected unqualified-id before 'for'
    8 | for i:=1 to n do begin
      | ^~~
foo.cc:9:33: error: 'readln' does not name a type
    9 | for j:=1 to n+1 do read(a[i,j]);readln;end;
      |                                 ^~~~~~
foo.cc:9:40: error: 'end' does not name a type
    9 | for j:=1 to n+1 do read(a[i,j]);readln;end;
      |                                        ^~~
foo.cc:10:1: error: 'end' does not name a type
   10 | end;
      | ^~~
foo.cc:11:1: error: 'procedure' does not name a type
   11 | procedure gause;
      | ^~~~~~~~~
foo.cc:12:1: error: 'var' does not name a type
   12 | var maxi,ii,i,j:longint;
      | ^~~
foo.cc:13:1: error: 'max' does not name a type
   13 | max,t:real;
      | ^~~
foo.cc:14:1: error: 'begin' does not name a type
   14 | begin
      | ^~~~~
foo.cc:17:20: error: 'maxi' does not name a type
   17 | max:=abs(a[ii,ii]);maxi:=ii;
      |                    ^~~~
foo.cc:18:1: error: expected unqualified-id before 'for'
   18 | for i:=ii+1 to n do if abs(a[i,ii])>max then begin maxi:=i;max:=abs(a[i,ii]);end;
      | ^~~
foo.cc:18:60: error: 'max' does not name a type
   18 | for i:=ii+1 to n do if abs(a[i,ii])>max then begin maxi:=i;max:=abs(a[i,ii]);end;
      |                                                            ^~~
foo.cc:18:78: error: 'end' does not name a type
   18 | for i:=ii+1 to n do if abs(a[i,ii])>max then begin maxi:=i;max:=abs(a[i,ii]);end;
      |                                                                              ^~~
foo.cc:19:1: error: expected unqualified-id before 'for'
   19 | for i:=1 to n+1 do
      | ^~~
foo.cc:20:18: error: 'a' does not name a type
   20 | begin t:=a[ii,i];a[ii,i]:=a[maxi,i];a[maxi,i]:=t;end;
      |                  ^
foo.cc:20:37: error: 'a' does not name a type
   20 | begin t:=a[ii,i];a[ii,i]:=a[maxi,i];a[maxi,i]:=t;end;
      |                                     ^
foo.cc:20:50: error: 'end' does not name a type
   20 | begin t:=a[ii,i];a[ii,i]:=a[maxi,i];a[maxi,i]:=t;end;
      |                                                  ^~~
foo.cc:21:1: error: expected unqualified-id before 'for'
   21 | for i:=ii+1 to n do
      | ^~~
foo.cc:24:1: error: expected unqualified-id before 'for'
   24 | for j:=ii+1 to n+1 do
      | ^~~
foo.cc:26:1: error: 'end' does not name a type
   26 | end;
      | ^~~
foo.cc:27:1: error: 'end' does not name a type
   27 | end;
      | ^~~
foo.cc:28:1: error: 'x' does not name a type
   28 | x[n]:=a[n,n+1]/a[n,n];
      | ^
foo.cc:29:1: error: expected unqualified-id before 'for'
   29 | for i:=n-1 downto 1 do
      | ^~~
foo.cc:32:1: error: 'x' does not name a type
   32 | x[i]:=a[i,n+1]/a[i,i];
      | ^
foo.cc:33:1: error: 'end' does not name a type
   33 | end;
      | ^~~
foo.cc:34:1: error: expected unqualified-id before 'for'
   34 | for i:=1 to n-1 do write(round(x[i]),' ');
      | ^~~
foo.cc:35:8: error: expected constructor, destructor, or type conversion before '(' token
   35 | writeln(round(x[n]));
      |        ^
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: 'gause' does not name a type
   39 | gause;
      | ^~~~~
foo.cc:40:1: error: 'end' does not name a type
   40 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1052 贾老二算算术
语言
C++
递交时间
2023-07-21 14:06:29
评测时间
2023-07-21 14:06:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes