首先从一道ACM简单题说起:
问题 B: Friendship of Mouse
时间限制: 1 Sec 内存限制: 64 MB提交: 24 解决: 15
[ 提交][ 状态][ 讨论版]
题目描述
Today in KBW, N mice from different cities are standing in a line. Each city is represented by a lowercase letter. The distance between adjacent mice (e.g. the 1
st and the 2
nd mouse, the N−1
th and

博客探讨了在在线判题平台(OJ)上遇到的一个数组初始化问题,导致RuntimeError的原因是使用`int loc[100] = {0}`进行数组初始化。作者检查代码并确认无数组越界后,改为`int loc[100];`,代码通过。文章推测可能是编译器标准不同导致的行为差异,但具体理论依据尚未明确。

463

被折叠的 条评论
为什么被折叠?



