Wrong Answer

foo.cc: In function 'int main()':
foo.cc:25:23: warning: 'b' may be used uninitialized [-Wmaybe-uninitialized]
   25 |         cout<<a<<" "<<b<<endl;
      |                       ^
foo.cc:5:30: note: 'b' was declared here
    5 |         int n,ans=0,ans1=0,a,b;
      |                              ^
foo.cc:25:18: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized]
   25 |         cout<<a<<" "<<b<<endl;
      |                  ^~~
foo.cc:5:28: note: 'a' was declared here
    5 |         int n,ans=0,ans1=0,a,b;
      |                            ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 3ms 332.0 KiB
#2 Accepted 4ms 412.0 KiB
#3 Wrong Answer Read 8, expect 7. 3ms 332.0 KiB
#4 Accepted 3ms 412.0 KiB
#5 Accepted 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P1492 C7 差距最大的相邻数
比赛
2023.8高级班结业模拟测试
语言
C++
递交时间
2023-08-09 09:04:50
评测时间
2023-08-09 09:04:50
评测机
分数
80
总耗时
18ms
峰值内存
412.0 KiB