为什么显示提交失败

P5740 【深基7.例9】最厉害的学生

提交失败的提示如下: invalid constant value 0 for luogu\type\recordlanguagetype
by _hello_w_ @ 2021-11-25 13:22:13


对,我也是
by skyskyCCC @ 2021-11-25 13:24:58


@[壮壮130531](/user/526938) 再交一次,洛谷评测机波动问题
by Phartial @ 2021-11-25 13:33:04


你们可以了吗,我的还是invalid constant value 0 for luogu\type\recordlanguagetype
by aaazyx @ 2021-11-25 13:37:49


我使用了结构体方法、和结构体+函数的方法,二种方法都在Dve c++ 5.11 上通过好几组数据验证,不知道为甚这里显示非法字符?
by _hello_w_ @ 2021-11-25 13:39:21


刚刚再次提交,还是非法字符,``` # include <bits/stdc++.h> using namespace std; struct tx { string name; int y,s,w,sum,sx; }str[1005]; int N; bool comp(tx x,tx y) { if (x.sum == y.sum) return x.sx < y.sx; else return x.sum > y.sum; } int main() { cin>>N; for (int i = 0; i < N; i++) { cin>>str[i].name>>str[i].y>>str[i].s>>str[i].w; str[i].sum = str[i].y + str[i].s + str[i].w; str[i].sx = i+1; } sort(str,str+N,comp); for (int i = 0; i < N; i++) cout<<str[i].name<<" "<<str[i].y<<" "<<str[i].s<<" "<<str[i].w<<" "<<str[i].sum<<" "<<str[i].sx<<endl; cout<<endl; cout<<str[0].name<<" "<<str[0].y<<" "<<str[0].s<<" "<<str[0].w<<" "<<str[0].sum<<" "<<str[0].sx; return 0; } ```
by _hello_w_ @ 2021-11-25 13:42:00


上课去了,晚上回来看看大神给我传授点什么功夫
by _hello_w_ @ 2021-11-25 13:48:12


@[mrsrz](/user/6813) @[chen_zhe](/user/8457) @[yyy2015c01](/user/5846) @[Anguei](/user/53062) 提交已经在Dve c++ 验证的程序,为啥这里会显示 非法字符?
by _hello_w_ @ 2021-11-25 18:21:59


@[CYJian](/user/20782) 管理员 能指点下 这个问题为什么吗?
by _hello_w_ @ 2021-11-25 19:57:22


@[tzc_2012_awa](/user/392304) 求教
by _hello_w_ @ 2021-11-25 20:41:29


| 下一页