社区讨论
CSPST4 95pts 求助
学术版参与者 3已保存回复 7
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 7 条
- 当前快照
- 1 份
- 快照标识符
- @lo4dtt5i
- 此快照首次捕获于
- 2023/10/24 21:48 2 年前
- 此快照最后确认于
- 2023/11/02 11:31 2 年前
改了一下,还是 WA ON #19
CPPbool checkp(long long st,int i,long long ed){
if(c[i]*ed+b[i]>=1){
if(c[i]>=1&&(ed+st)*(ed-st+1)/2>=a[i]/c[i]+1)
return true;
else
return c[i]*((ed+st)*(ed-st+1)/2)+(ed-st+1)*b[i]>=a[i];
}
long long s=b[i]/(-c[i]);
if(b[i]%(-c[i])==0)
s--;
return b[i]*(s-st+1)+c[i]*((s+st)*(s-st+1)/2)+ed-s>=a[i];
}
省略了除了 checkp 以外的
回复
共 7 条回复,欢迎继续交流。
正在加载回复...