Language: C++

#include <iostream>
using namespace std;

double dist(pair<double, double> a, pair<double, double> b) {
	return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se)); 
}

int main() {
	int n; cin >> n;
  	vector<pair<double, double>> v(n);
  	for (int i = 0; i < n; i++) {
    	cin >> v[i].first >> v[i].second;
    }
	double avg = 0;
  	for (int i = 0; i < n; i++) {
     	for (int j = i + 1; j < n; j++) {
        	avg += dist(v[i], v[j]); 
        }
    }
  	avg /= (n - 1) / 2;
  	cout << setprecision(12) << avg << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'double dist(std::pair<double, double>, std::pair<double, double>)':
a.cc:5:24: error: 'struct std::pair<double, double>' has no member named 'fi'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                        ^~
a.cc:5:31: error: 'struct std::pair<double, double>' has no member named 'fi'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                               ^~
a.cc:5:40: error: 'struct std::pair<double, double>' has no member named 'fi'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                        ^~
a.cc:5:47: error: 'struct std::pair<double, double>' has no member named 'fi'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                               ^~
a.cc:5:56: error: 'struct std::pair<double, double>' has no member named 'se'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                                        ^~
a.cc:5:63: error: 'struct std::pair<double, double>' has no member named 'se'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                                               ^~
a.cc:5:72: error: 'struct std::pair<double, double>' has no member named 'se'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                                                        ^~
a.cc:5:79: error: 'struct std::pair<double, double>' has no member named 'se'
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                                                                               ^~
a.cc:5:16: error: 'sqrt' was not declared in this scope
    5 |         return sqrt((a.fi - b.fi) * (a.fi - b.fi) + (a.se - b.se) * (a.se - b.se));
      |                ^~~~
a.cc: In function 'int main()':
a.cc:10:9: error: 'vector' was not declared in this scope
   10 |         vector<pair<double, double>> v(n);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:10:35: error: expected primary-expression before '>' token
   10 |         vector<pair<double, double>> v(n);
      |                                   ^~
a.cc:10:38: error: 'v' was not declared in this scope
   10 |         vector<pair<double, double>> v(n);
      |                                      ^
a.cc:21:17: error: 'setprecision' was not declared in this scope
   21 |         cout << setprecision(12) << avg << endl;
      |                 ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | using namespace std;