rt
#include <iostream>
using namespace std;
const int z = 5e6 + 7;
int a[z], b[z];
int main() {
a[0] = b[0] = 1;
cout << a[0] << " " << b[0] << "\n";
return 0;
}
这段代码很正常
但若是改成这样
#include <iostream>
using namespace std;
const int z = 5e6 + 7;
int a[z] = {1}, b[z] = {1};
int main() {
cout << a[0] << " " << b[0] << "\n";
return 0;
}
则会发生有趣的现象:
- 在编译器上会变卡顿,窗口比第一段代码晚出现
- 在在线编译器(洛谷在线IDE)上会CE,且输出"Nothing is compiled: OUTPUT exceeds."
有大佬知道这是为什么吗?
求解答,谢谢!