QOJ.ac
QOJ
The 2nd Universal Cup Finals is coming! Check out our event page, schedule, and competition rules!
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#768461 | #8049. Equal Sums | water_three | Compile Error | / | / | C++14 | 1.1kb | 2024-11-21 10:54:36 | 2024-11-21 10:54:37 |
Judging History
This is the latest submission verdict.
- [2024-11-21 10:54:37]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-11-21 10:54:36]
- Submitted
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n,m,l[710],r[710],L[710],R[710];
ll f[510][510000],delt[510][510000],c[510000],mod=998244353,ans[510][510];
int main(){
cin>>n>>m;
for(int i=1;i<=n;i++)cin>>l[i]>>r[i];
for(int i=1;i<=m;i++)cin>>L[i]>>R[i];
f[0][250000]=1;
for(int i=0;i<=n;i++){
for(int j=0;j<=m-1;j++){
for(int k=0;k<=500000;k++){
if(k-250000>=0){
c[max(k-R[j+1],0)]+=f[j][k],c[max(k-L[j+1]+1,0)]-=f[j][k];
}
else{
delt[j][k+l[i+1]]+=f[j][k],delt[j][k+r[i+1]+1]-=f[j][k];
}
}
for(int k=0;k<=500000;k++){
if(k)c[k]+=c[k-1];
f[j+1][k]+=c[k];
}
for(int k=0;k<=500000;k++)c[k]=0;
}
for(int j=1;j<=m;j++){
ans[i][j]=f[j][250000];
}
if(i==n)break;
for(int j=0;j<=m;j++){
for(int k=1;k<=500000;k++){
delt[j][k]+=delt[j][k-1];
}
}
for(int j=0;j<=m;j++){
for(int k=0;k<=500000;k++){
f[j][k]=delt[j][k],delt[j][k]=0;
}
}
}
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
cout<<ans[i][j]<<" ";
}
cout<<"\n";
}
return 0;
}
Details
/tmp/ccTKI19w.o: in function `main': answer.code:(.text.startup+0x9): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x12): relocation truncated to fit: R_X86_64_PC32 against symbol `l' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `r' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x44): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x52): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x7e): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x98): relocation truncated to fit: R_X86_64_PC32 against symbol `L' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0x9f): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0xca): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccTKI19w.o answer.code:(.text.startup+0xd6): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status