Language: C++

#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main(){
  int N,x,y;cin>>N;
  vector<pair<int,int>>s(N);
  for(int i=0;i<N;i++){
    cin>>x>>y;
    s.at(i)=make_pair(x,y);
  }
  int c=0;
  double l=0;
  sort(s.begin(),s.end());
  do{
    c++;
    for(int i=1;i<N;i++)l+=sqrt((s.at(i).first-s.at(i-1).first)*(s.at(i).first-s.at(i-1).first)+(s.at(i).secoud-s.at(i-1).secoud)*(s.at(i).secoud-s.at(i-1).secoud));
  }while(next_permutation(s.begin(),s.end()));
  printf("%lf",l/c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:106: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'secoud'; did you mean 'second'?
   16 |     for(int i=1;i<N;i++)l+=sqrt((s.at(i).first-s.at(i-1).first)*(s.at(i).first-s.at(i-1).first)+(s.at(i).secoud-s.at(i-1).secoud)*(s.at(i).secoud-s.at(i-1).secoud));
      |                                                                                                          ^~~~~~
      |                                                                                                          second
a.cc:16:123: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'secoud'; did you mean 'second'?
   16 |     for(int i=1;i<N;i++)l+=sqrt((s.at(i).first-s.at(i-1).first)*(s.at(i).first-s.at(i-1).first)+(s.at(i).secoud-s.at(i-1).secoud)*(s.at(i).secoud-s.at(i-1).secoud));
      |                                                                                                                           ^~~~~~
      |                                                                                                                           second
a.cc:16:140: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'secoud'; did you mean 'second'?
   16 |     for(int i=1;i<N;i++)l+=sqrt((s.at(i).first-s.at(i-1).first)*(s.at(i).first-s.at(i-1).first)+(s.at(i).secoud-s.at(i-1).secoud)*(s.at(i).secoud-s.at(i-1).secoud));
      |                                                                                                                                            ^~~~~~
      |                                                                                                                                            second
a.cc:16:157: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'secoud'; did you mean 'second'?
   16 |     for(int i=1;i<N;i++)l+=sqrt((s.at(i).first-s.at(i-1).first)*(s.at(i).first-s.at(i-1).first)+(s.at(i).secoud-s.at(i-1).secoud)*(s.at(i).secoud-s.at(i-1).secoud));
      |                                                                                                                                                             ^~~~~~
      |                                                                                                                                                             second