/ Vijos /

记录详情

Runtime Error

foo.cc: In function 'int main()':
foo.cc:7:18: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
   scanf("%d",a[i]);
                  ^
foo.cc:12:17: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations]
   if(maxhigh>a[i]){
              ~~~^
foo.cc:10:15: note: within this loop
  for(int i=0;i<=10;i++){
              ~^~~~
foo.cc:7:8: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations]
   scanf("%d",a[i]);
   ~~~~~^~~~~~~~~~~
foo.cc:6:15: note: within this loop
  for(int i=0;i<=10;i++){
              ~^~~~
foo.cc:13:8: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   ans++;
        ^

自豪的采用jd5进行评测(github.com/masnn/jd5)
{"receive":"2020-02-25T14:47:49.696Z","handle":"2020-02-25T14:47:49.696Z","cache_start":"2020-02-25T14:47:49.696Z","read_cases":"2020-02-25T14:47:50.192Z","judge":"2020-02-25T14:47:50.195Z","done":"2020-02-25T14:47:53.129Z"}
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 244.0 KiB
#2 Runtime Error Segmentation fault 2ms 232.0 KiB
#3 Runtime Error Segmentation fault 2ms 232.0 KiB
#4 Runtime Error Segmentation fault 2ms 232.0 KiB
#5 Runtime Error Segmentation fault 3ms 232.0 KiB
#6 Runtime Error Segmentation fault 3ms 268.0 KiB
#7 Runtime Error Segmentation fault 2ms 232.0 KiB
#8 Runtime Error Segmentation fault 2ms 252.0 KiB
#9 Runtime Error Segmentation fault 2ms 232.0 KiB
#10 Runtime Error Segmentation fault 2ms 232.0 KiB

信息

递交者
类型
递交
题目
P1102 陶陶摘苹果
语言
C++
递交时间
2020-02-25 22:47:49
评测时间
2020-02-25 22:47:49
评测机
分数
0
总耗时
22ms
峰值内存
268.0 KiB