这样我还是放一下原版的一小部分吧
```cpp
tot++;
for (int i=1; i<=m; i++)
if (a[i]==0) /*s[i]++;*/
cout << i << ' ';
cout << endl << tot << endl;
return;
```
by 绿绵羊 @ 2020-08-11 18:03:37
@[添哥](/user/264463) 洛谷IDE也是这样啊
by 绿绵羊 @ 2020-08-11 18:03:54
@[洛谷is_the_best](/user/35153) 有没有跟```a```重名的全局变量?或者```a```是否被重复定义过?
by jwcub @ 2020-08-11 18:04:08
@[Penguins](/user/75437) 没有,查过很多次
by 绿绵羊 @ 2020-08-11 18:04:40
@[洛谷is_the_best](/user/35153) 您等到赛后公开完整代码吧……
by 添哥 @ 2020-08-11 18:04:41
UB 了吧……没有完整代码怎么查。。。。
by ezoixx130 @ 2020-08-11 18:05:05
ez!
by 添哥 @ 2020-08-11 18:05:22
```cpp
tot++;
for (int i=1; i<=m; i++)
if (a[i]==0) /*s[i]++;*/
cout << i << ' ';
cout << endl << tot << endl;//加了这两句就没问题,不加就有问题(指tot变量)
return;
```
by 绿绵羊 @ 2020-08-11 18:05:32
达成成就:ez楼下
by 添哥 @ 2020-08-11 18:05:47
~~UB啥意思啊~~
by 绿绵羊 @ 2020-08-11 18:06:04