神奇的编译器
  • 板块学术版
  • 楼主SunnyYuan
  • 当前回复11
  • 已保存回复11
  • 发布时间2024/11/1 21:22
  • 上次更新2024/11/2 07:42:41
查看原帖
神奇的编译器
520333
SunnyYuan楼主2024/11/1 21:22

为啥在洛谷上,我这样为结构体赋值就会 CE:

代码

struct node {
    int f = inf;
    int tag = 0;
    int add = 0;
    int ans = 0;
} tr[N << 2];

显示 Nothing is compiled: OUTPUT exceeds.,但本地可过。

但是写构造函数就不会 CE:

struct node {
    node():f(inf), tag(0), add(0), ans(0) {}
    int f;
    int tag;
    int add;
    int ans;
} tr[N << 2];

搜索无果。

2024/11/1 21:22
加载中...