Wrong Answer

foo.cc: In function 'int main()':
foo.cc:7:52: warning: variable 'cmaxs' set but not used [-Wunused-but-set-variable]
    7 |  int min=100000,mins,max=-100000,maxs,cmax=-100000,cmaxs;
      |                                                    ^~~~~
foo.cc:18:9: warning: 'maxs' may be used uninitialized in this function [-Wmaybe-uninitialized]
   18 |  a[maxs]=-100000;
      |  ~~~~~~~^~~~~~~~
foo.cc:25:3: warning: 'mins' may be used uninitialized in this function [-Wmaybe-uninitialized]
   25 |   if(mins<maxs) cout<<max-min<<endl;
      |   ^~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 2ms 384.0 KiB
#2 Wrong Answer Read 0, expect 14. 4ms 384.0 KiB
#3 Wrong Answer Read -1, expect 996. 2ms 384.0 KiB
#4 Accepted 5ms 512.0 KiB
#5 Wrong Answer Read 0, expect 999. 6ms 384.0 KiB

信息

递交者
类型
递交
题目
P1324 3-3 炒股发财
语言
C++
递交时间
2022-08-07 19:39:51
评测时间
2022-08-07 19:39:51
评测机
分数
40
总耗时
22ms
峰值内存
512.0 KiB