O2还是tle就离谱
by tgs9311 @ 2021-11-03 20:19:35
UB((((
by wzj_zhzx_oicon @ 2021-11-03 20:20:24
@[BreakPlus](/user/334727) 我把cin换成scanf又t成50了
by tgs9311 @ 2021-11-03 20:22:37
数组开小一半也能过,麻了
by tgs9311 @ 2021-11-03 20:24:04
然后我开大了还是和之前一样的情况
by tgs9311 @ 2021-11-03 20:28:06
update 改成 void 类型
非 void 函数不写返回值是 UB
by mazihang2022 @ 2021-11-03 20:30:37
```plain
main.cpp: In function 'int update(int, int)':
main.cpp:74:1: warning: no return statement in function returning non-void [-Wreturn-type]
74 | }
| ^
```
不开编译警告是 `-O2` 的锅吗?
by ud2_ @ 2021-11-03 20:34:51
建议使用 `-Wall` 编译指令![](//图.tk/e)
by naroanah @ 2021-11-03 20:36:16
@[ud2_](/user/206953) 感谢,还是第一次遇到,但主要是我发现没开o2没发生问题/px
by tgs9311 @ 2021-11-03 20:41:24