Compile Error

foo.cc: In function 'int main()':
foo.cc:23:2: error: 'sort' was not declared in this scope
  sort(d+1,d+n+1);
  ^~~~
foo.cc:23:2: note: suggested alternative: 'qsort'
  sort(d+1,d+n+1);
  ^~~~
  qsort
foo.cc:24:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  printf("%d\n",d[n+1>>1]);
                  ~^~
foo.cc:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&k);
  ~~~~~^~~~~~~~~~~~~~
foo.cc:18:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int l,r; scanf("%d%d",&l,&r);
            ~~~~~^~~~~~~~~~~~~~
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
P1885 堆砖
语言
C++
递交时间
2021-04-30 12:47:47
评测时间
2021-05-11 09:36:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes