QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#695739#55. 欧几里得距离之和fms0 45ms3956kbC++14320b2024-10-31 20:41:312024-10-31 20:41:31

Judging History

你现在查看的是最新测评结果

  • [2024-10-31 20:41:31]
  • 评测
  • 测评结果:0
  • 用时:45ms
  • 内存:3956kb
  • [2024-10-31 20:41:31]
  • 提交

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;}

詳細信息

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%