记录详情

Runtime Error

foo.cc: In function 'int findmax(int)':
foo.cc:15:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if (h[i]>max1);
   ^~
foo.cc:16:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   { max1=h[i];
   ^
foo.cc: In function 'int findmin(int)':
foo.cc:36:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if (h[i]<min1);
   ^~
foo.cc:37:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   { min1=h[i];
   ^
foo.cc: In function 'int main()':
foo.cc:54:7: warning: unused variable 'shu2' [-Wunused-variable]
   int shu2=findmax(shu1);
       ^~~~
foo.cc:60:7: warning: unused variable 'shu3' [-Wunused-variable]
   int shu3=findmax(n-shu1);
       ^~~~
foo.cc:49:20: warning: 'n' is used uninitialized in this function [-Wuninitialized]
  int shu1=findmax(n);
                    ^
foo.cc: In function 'int findmax(int)':
foo.cc:22:9: warning: 'shu' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return shu;
         ^~~
foo.cc: In function 'int findmin(int)':
foo.cc:43:9: warning: 'zhu' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return zhu;
         ^~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 384.0 KiB
#2 Wrong Answer Read 0, expect 1. 2ms 384.0 KiB
#3 Runtime Error Aborted 11ms 388.0 KiB
#4 Runtime Error Aborted 2ms 384.0 KiB
#5 Runtime Error Segmentation fault 3ms 384.0 KiB

信息

递交者
类型
递交
题目
P1033 环形山丘
比赛
周末测试2
语言
C++
递交时间
2021-09-24 21:35:37
评测时间
2021-09-24 21:35:37
评测机
分数
20
总耗时
22ms
峰值内存
388.0 KiB