记录详情

Accepted

foo.cc: In function ‘int Max(int*, int)’:
foo.cc:19:16: warning: ‘imax’ may be used uninitialized [-Wmaybe-uninitialized]
   19 |         return imax;
      |                ^~~~
foo.cc:5:18: note: ‘imax’ was declared here
    5 |         int max, imax;
      |                  ^~~~
foo.cc: In function ‘int Second_Max(int*, int)’:
foo.cc:39:45: warning: ‘Second_Max’ may be used uninitialized [-Wmaybe-uninitialized]
   39 |                 if (input[i] != input[imax] && input[i] > Second_Max)
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:23:13: note: ‘Second_Max’ was declared here
   23 |         int Second_Max, sum = 0;
      |             ^~~~~~~~~~
foo.cc:45:16: warning: ‘iSecond_Max’ may be used uninitialized [-Wmaybe-uninitialized]
   45 |         return iSecond_Max;
      |                ^~~~~~~~~~~
foo.cc:24:13: note: ‘iSecond_Max’ was declared here
   24 |         int iSecond_Max;
      |             ^~~~~~~~~~~
# 状态 耗时 内存占用
#1 Accepted 3ms 548.0 KiB
#2 Accepted 2ms 764.0 KiB
#3 Accepted 2ms 536.0 KiB
#4 Accepted 2ms 532.0 KiB
#5 Accepted 2ms 536.0 KiB

信息

递交者
类型
递交
比赛
2024程序设计与竞赛作业赛第一场(喜相逢)
语言
C++
递交时间
2024-09-29 20:21:09
评测时间
2024-09-29 20:21:09
评测机
分数
100
总耗时
13ms
峰值内存
764.0 KiB