Language: C++

#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define set_zero(a) memset(a,0,sizeof(a));
#define ll long long int
#define PI 2 * acos(0.0)
#define MAX 1000000000000000000
#define in(a) scanf("%d",&a);
#define out(a) printf("%d",a);
#define INF 1000000 
#define M 1000000007
#define pi 3.14159265 
using namespace std; 
int main(){ 
   fast_io
   ll n;
   cin>>n;
   ll a[n];
   for(ll i = 0;i<n;i++) cin>>a[i];
   long double ans = 0.0;
   for(ll i = 0;i<(n-1);i++){
      long double y = (long double) a[i];
      for(ll j = i+1;j<n;j++){
         long double r = (long double) a[j];
         long double sum = (y+r)/2.0;
         for(ll k = 0;k<n;k++){
            if(a[k] != a[i] && a[k] != a[j]){
               long double b = (long double) a[k];
               sum = (sum+b)/2.0;
            }
         }
         ans = max(ans,sum);
      }
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;
   return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:1:17: error: 'ios_base' has not been declared
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
      |                 ^~~~~~~~
a.cc:13:4: note: in expansion of macro 'fast_io'
   13 |    fast_io
      |    ^~~~~~~
a.cc:1:50: error: 'cin' was not declared in this scope
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
      |                                                  ^~~
a.cc:13:4: note: in expansion of macro 'fast_io'
   13 |    fast_io
      |    ^~~~~~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
a.cc:1:58: error: 'NULL' was not declared in this scope
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
      |                                                          ^~~~
a.cc:13:4: note: in expansion of macro 'fast_io'
   13 |    fast_io
      |    ^~~~~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
a.cc:1:64: error: 'cout' was not declared in this scope
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
      |                                                                ^~~~
a.cc:13:4: note: in expansion of macro 'fast_io'
   13 |    fast_io
      |    ^~~~~~~
a.cc:1:64: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
      |                                                                ^~~~
a.cc:13:4: note: in expansion of macro 'fast_io'
   13 |    fast_io
      |    ^~~~~~~
a.cc:30:16: error: 'max' was not declared in this scope
   30 |          ans = max(ans,sum);
      |                ^~~
a.cc:33:10: error: 'fixed' was not declared in this scope
   33 |    cout<<fixed<<setprecision(15)<<ans<<endl;
      |          ^~~~~
a.cc:1:1: note: 'std::fixed' is defined in header '<ios>'; this is probably fixable by adding '#include <ios>'
  +++ |+#include <ios>
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
a.cc:33:17: error: 'setprecision' was not declared in this scope
   33 |    cout<<fixed<<setprecision(15)<<ans<<endl;
      |                 ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
  +++ |+#include <iomanip>
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
a.cc:33:40: error: 'endl' was not declared in this scope
   33 |    cout<<fixed<<setprecision(15)<<ans<<endl;
      |                                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);