QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#653847#7941. JackpotZhaoZiLongCompile Error//C++11421b2024-10-18 20:44:212024-10-18 20:44:44

詳細信息

answer.code: In function ‘int main()’:
answer.code:18:25: error: ‘abs’ was not declared in this scope
   18 |             sum = sum + abs(arr[i] - arr[2 * n - i + 1]);
      |                         ^~~
answer.code:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d", &t);
      |     ~~~~~^~~~~~~~~~
answer.code:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
answer.code:14:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |             scanf("%d", &arr[i]);
      |             ~~~~~^~~~~~~~~~~~~~~