Language: C++

#include <bits/stdc++.h>
using namespace std;

double distance(pair<int> a, pair<int> b){
  return sqrt(pow(a.first-b.first,2.0)+pow(a.second-b.second,2.0));
}

int main(){
  int N;
  cin>>N;
  vector<pair<int>> xy(N);
  for(int i=0;i<N;i++){
    cin>>xy.at(i).first>>xy.at(i).second;
  }
  
  double sum=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j++){
      sum+=distance(xy.at(i),xy.at(j));
    }
  }
  
  cout<<xy.at(i)*2.0/(double)N<<endl;
}

  

Compiler output:
a.cc:4:25: error: wrong number of template arguments (1, should be 2)
    4 | double distance(pair<int> a, pair<int> b){
      |                         ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:4:38: error: wrong number of template arguments (1, should be 2)
    4 | double distance(pair<int> a, pair<int> b){
      |                                      ^
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc: In function 'double distance(int, int)':
a.cc:5:21: error: request for member 'first' in 'a', which is of non-class type 'int'
    5 |   return sqrt(pow(a.first-b.first,2.0)+pow(a.second-b.second,2.0));
      |                     ^~~~~
a.cc:5:29: error: request for member 'first' in 'b', which is of non-class type 'int'
    5 |   return sqrt(pow(a.first-b.first,2.0)+pow(a.second-b.second,2.0));
      |                             ^~~~~
a.cc:5:46: error: request for member 'second' in 'a', which is of non-class type 'int'
    5 |   return sqrt(pow(a.first-b.first,2.0)+pow(a.second-b.second,2.0));
      |                                              ^~~~~~
a.cc:5:55: error: request for member 'second' in 'b', which is of non-class type 'int'
    5 |   return sqrt(pow(a.first-b.first,2.0)+pow(a.second-b.second,2.0));
      |                                                       ^~~~~~
a.cc: In function 'int main()':
a.cc:11:15: error: wrong number of template arguments (1, should be 2)
   11 |   vector<pair<int>> xy(N);
      |               ^~~
/usr/include/c++/14/bits/stl_pair.h:89:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
   89 |     struct pair;
      |            ^~~~
a.cc:11:18: error: template argument 1 is invalid
   11 |   vector<pair<int>> xy(N);
      |                  ^~
a.cc:11:18: error: template argument 2 is invalid
a.cc:13:13: error: request for member 'at' in 'xy', which is of non-class type 'int'
   13 |     cin>>xy.at(i).first>>xy.at(i).second;
      |             ^~
a.cc:13:29: error: request for member 'at' in 'xy', which is of non-class type 'int'
   13 |     cin>>xy.at(i).first>>xy.at(i).second;
      |                             ^~
a.cc:18:22: error: expected ';' before ')' token
   18 |     for(int j=i+1;j++){
      |                      ^
      |                      ;
a.cc:19:24: error: request for member 'at' in 'xy', which is of non-class type 'int'
   19 |       sum+=distance(xy.at(i),xy.at(j));
      |                        ^~
a.cc:19:33: error: request for member 'at' in 'xy', which is of non-class type 'int'
   19 |       sum+=distance(xy.at(i),xy.at(j));
      |                                 ^~
a.cc:23:12: error: request for member 'at' in 'xy', which is of non-class type 'int'
   23 |   cout<<xy.at(i)*2.0/(double)N<<endl;
      |            ^~
a.cc:23:15: error: 'i' was not declared in this scope
   23 |   cout<<xy.at(i)*2.0/(double)N<<endl;
      |               ^