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 |
---|---|---|---|---|---|---|---|---|---|
#359446 | #6517. Computational Geometry | Doqe | Compile Error | / | / | C++14 | 695b | 2024-03-20 17:56:09 | 2024-03-20 17:56:10 |
Judging History
This is the latest submission verdict.
- [2024-03-20 17:56:10]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-03-20 17:56:09]
- Submitted
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e4+10;
long long W[N][N];
int x[N],y[N];
long long abs(int i,int j)
{
return 1ll*(x[i]-x[j])*(x[i]-x[j])+1ll*(y[i]-y[j])*(y[i]-y[j]);
}
int main()
{
int T;cin>>T;
int U=(T<=10);
while(T--)
{
int n;cin>>n;
for(int i=1;i<=n;++i)cin>>x[i]>>y[i],x[n+i]=x[i],y[n+i]=y[i];
if(++C==120)
{
for(int i=1;i<=n;++i)cout<<x[i]<<" "<<y[i]<<endl;
}
long long ans=8e18;
for(int d=2;d<=n+1;++d)
for(int i=1,j=d;j<=n*2;++i,++j)
W[i][j]=max({W[i][j-1],W[i+1][j],abs(i,j)});
for(int i=1;i<=n;++i)
for(int j=3;j<=n-1;++j)
ans=min(ans,W[i][i+j-1]+W[i+j-1][i+n]);
if(U)cout<<ans<<endl;
}
}
Details
answer.code: In function ‘int main()’: answer.code:18:22: error: ‘C’ was not declared in this scope 18 | if(++C==120) | ^