注意输入的性别是字符而不是 bool。
不要像我一样写如下抽象代码:
ll chang(bool sex,ll x){
if(sex) return nan(x);
else return nv(x);
}
...
int main(){
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n;
for(int i=1;i<=n;i++){
...
sc[i]=s+chang(sex,to_sec(ti))+10*(pass=='P')+f,ci[i]+=c;
}
...
return 0;
}
虚空调试 0.5h。