Runtime Error

foo.cc: In function 'int main()':
foo.cc:18:23: warning: iteration 10000 invokes undefined behavior [-Waggressive-loop-optimizations]
   18 |                 if(c[i]>big)
      |                    ~~~^
foo.cc:17:22: note: within this loop
   17 |         for(int i=1;i<=10002;i++)
      |                     ~^~~~~~~
foo.cc:20:15: warning: 'g' may be used uninitialized [-Wmaybe-uninitialized]
   20 |         cout<<g;
      |               ^
foo.cc:7:43: note: 'g' was declared here
    7 |         int x,y;cin>>x>>y;int big=INT_MIN,g;
      |                                           ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Read 3, expect 5. 2ms 284.0 KiB
#2 Wrong Answer Read 14, expect 3. 2ms 284.0 KiB
#3 Wrong Answer Read 61, expect 49. 2ms 284.0 KiB
#4 Wrong Answer Read 157, expect 115. 2ms 284.0 KiB
#5 Wrong Answer Read 510, expect 323. 3ms 284.0 KiB
#6 Wrong Answer Read 1058, expect 694. 4ms 284.0 KiB
#7 Wrong Answer Read 2579, expect 1445. 6ms 284.0 KiB
#8 Wrong Answer Read 5391, expect 2645. 12ms 412.0 KiB
#9 Runtime Error Segmentation fault 20ms 424.0 KiB
#10 Runtime Error Segmentation fault 19ms 404.0 KiB

信息

递交者
类型
递交
题目
P1807 奶牛的选举
比赛
2023.5.20中级班期中测试赛
语言
C++
递交时间
2023-05-20 09:59:18
评测时间
2023-05-20 09:59:19
评测机
分数
0
总耗时
76ms
峰值内存
424.0 KiB