QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#695739 | #55. 欧几里得距离之和 | fms | 0 | 45ms | 3956kb | C++14 | 320b | 2024-10-31 20:41:31 | 2024-10-31 20:41:31 |
Judging History
answer
#include<bits/stdc++.h>
using I=int;using D=double;
const I N=5e5;I x[N],y[N];
int main(){std::cin.tie(0)->sync_with_stdio(0);
I n;std::cin>>n;for(I i=0;i<n;i++)std::cin>>x[i]>>y[i];D w=0;
for(I i=0;i<n;i++)for(I j=i+1;j<n;j++)w+=sqrt((x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]));
std::cout<<w<<'\n';return 0;}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 45ms
memory: 3956kb
input:
3000 -802420 -321989 227507 956314 -460698 -819834 -479809 -341770 191520 109304 712327 -189558 -578326 -41090 282566 982266 -859119 686756 209058 -23298 -884994 -349898 -11358 182915 -507706 -81622 745434 575941 -374809 139274 810223 367608 960234 -197223 439081 573568 -275182 999306 -583036 -61808...
output:
-nan
result:
wrong output format Expected double, but "-nan" found
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #1:
0%
Subtask #4:
score: 0
Skipped
Dependency #1:
0%
Subtask #5:
score: 0
Skipped
Dependency #1:
0%