QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#695703 | #55. 欧几里得距离之和 | fms | 0 | 74ms | 3964kb | C++14 | 377b | 2024-10-31 20:38:18 | 2024-10-31 20:38:20 |
Judging History
answer
#include<bits/stdc++.h>
using I=int;using D=float;template<class T>using V=std::vector<T>;template<class T,I N>using A=std::array<T,N>;
int main(){I n;std::cin>>n;V<A<I,2>>p(n);for(auto&[x,y]:p)std::cin>>x>>y;
auto dis=[&](auto&&x,auto&&y){return std::hypot(x[0]-y[0],x[1]-y[1]);};
D w=0;for(I i=0;i<n;i++)for(I j=i+1;j<n;j++)w+=dis(p[i],p[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: 10
Accepted
time: 74ms
memory: 3964kb
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:
4.69308e+12
result:
ok found '4693080000000.00000', expected '4693148621177.00000', error '0.00001'
Test #2:
score: 10
Accepted
time: 74ms
memory: 3956kb
input:
3000 355304 988961 795796 -662640 -645198 -958837 329302 785647 -299213 -228904 -57373 -168432 878619 217989 -139688 -425127 -913922 56220 37759 -629073 845165 947960 138567 -158544 -273997 665415 -542631 -396335 671243 746363 915256 -658071 822875 107176 907246 -122566 -435158 542446 246635 -219367...
output:
4.74327e+12
result:
ok found '4743270000000.00000', expected '4743610987955.02344', error '0.00007'
Test #3:
score: 0
Wrong Answer
time: 73ms
memory: 3820kb
input:
3000 786103 -845895 689793 79187 595234 839298 514009 -846559 384647 330593 753754 -684307 259322 -573700 783331 -225552 374250 -511337 -918633 749936 -866081 739595 576173 -890867 369485 -443171 -64775 -82830 -629343 799652 -6309 -656049 -467133 43098 -690934 137775 -365643 -259929 809532 -552527 -...
output:
4.67056e+12
result:
wrong answer 1st numbers differ - expected: '4671074128383.44824', found: '4670560000000.00000', error = '0.00011'
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%