厌氧求助

P1129 [ZJOI2007] 矩阵游戏

@[lishenghao](/user/361773) 有种可能是你没加return0(
by Bernie_qwq @ 2022-10-02 10:21:42


@[lishenghao](/user/361773) ~~sorry我瞎说的~~
by Bernie_qwq @ 2022-10-02 10:23:10


@[TX_Bernie](/user/701460) 不过确实是的。
by EnkindledHope @ 2022-10-02 10:39:14


@[TX_Bernie](/user/701460) 没加 `return 0;` 是 UB。
by EnkindledHope @ 2022-10-02 10:39:35


@[lishenghao](/user/361773) ``` for(i=1; i<=N; i++) g[i].clear(); ``` `i == N` 时越界。 --- @[Tianyi_OI](/user/579069) `main` 是唯一的可以省略 `return` 的非 `void` 函数,`int main() {}` 没有 UB。
by ud2_ @ 2022-10-02 10:57:42


Thanks
by lishenghao @ 2022-10-02 12:56:57


|