/ Vijos /

记录详情

Compile Error

foo.c: In function 'time_taken':
foo.c:39:9: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   time+=abs(arr[i]-mid); 
         ^~~
foo.c: In function 'main':
foo.c:49:9: error: 'new' undeclared (first use in this function)
  int *a=new int[n];
         ^~~
foo.c:49:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:49:13: error: expected ',' or ';' before 'int'
  int *a=new int[n];
             ^~~
foo.c:50:13: error: expected ',' or ';' before 'int'
  int *b=new int[n];
             ^~~
foo.c:48:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&n,&m);
  ^~~~~~~~~~~~~~~~~~~
foo.c:51:20: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  for(i = 0;i<n;i++)scanf("%d",&a[i]);
                    ^~~~~~~~~~~~~~~~~
foo.c:54:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&l,&r);
   ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1459 车展
语言
C
递交时间
2021-10-25 17:07:08
评测时间
2021-10-25 17:07:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes