Runtime Error

foo.cc: In function 'int main()':
foo.cc:14:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&a[i]);
   ~~~~~^~~~~~~~~~~~
foo.cc:18:13: warning: iteration 9 invokes undefined behavior [-Waggressive-loop-optimizations]
   if(max<a[i])
          ~~~^
foo.cc:16:11: note: within this loop
  for(i=1;i<=N;i++)
          ~^~~
foo.cc:10:12: warning: 'min' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int i,max,min;
            ^~~
foo.cc:10:8: warning: 'max' may be used uninitialized in this function [-Wmaybe-uninitialized]
  int i,max,min;
        ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Aborted 1ms 384.0 KiB
#2 Runtime Error Aborted 1ms 384.0 KiB
#3 Runtime Error Aborted 1ms 384.0 KiB
#4 Runtime Error Aborted 1ms 384.0 KiB
#5 Runtime Error Aborted 1ms 384.0 KiB

信息

递交者
类型
递交
题目
P1090 阶段测验3(1)
语言
C++
递交时间
2021-07-26 22:11:41
评测时间
2021-07-26 22:11:41
评测机
分数
0
总耗时
9ms
峰值内存
384.0 KiB