Compile Error

foo.cc: In function 'int main(int, char**)':
foo.cc:5:14: error: 'inf' was not declared in this scope; did you mean 'int'?
    5 |     int  n,a[inf];
      |              ^~~
      |              int
foo.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>n;
      |     ^~~
foo.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin>>a[i];
      |          ^
foo.cc:9:15: error: 'a' was not declared in this scope
    9 |     mergesort(a,0,n-1);
      |               ^
foo.cc:9:5: error: 'mergesort' was not declared in this scope
    9 |     mergesort(a,0,n-1);
      |     ^~~~~~~~~
foo.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout<<a[i]<<" ";
      |     ^~~~
foo.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<endl;
      |     ^~~~
foo.cc:12:11: error: 'endl' was not declared in this scope
   12 |     cout<<endl;
      |           ^~~~
foo.cc:13:13: error: expected '}' at end of input
   13 |     return 0;
      |             ^
foo.cc:2:1: note: to match this '{'
    2 | {
      | ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1167 归并排序
语言
C++
递交时间
2022-03-13 15:21:34
评测时间
2022-03-13 15:21:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes