Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
#define N 105
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;

int n;
int d[3][N];
int point[3][N],r[N];

void cal(int x){
    for(int i=0;i<n;i++){
        int cnt=0;
        for(int j=0;j<n;j++){
            if(d[x][i]<d[x][j]){
                cnt++;
            }
        }
        point[x][i]=r[cnt];
    }
}
int a[N],sum[N];

int check(int x){
    for(int i=1;i<=100;i++){
        d[x][0]++;
        for(int j=0;j<n;j++){
            int cnt=0;
            for(int k=0;k<n;k++){
                if(d[x][j]<d[x][k]){
                    cnt++;
                }
            }
            a[j]=r[cnt];
        }
        memset(sum,0,sizeof(sum));
        for(int j=0;j<n;j++)
            for(int k=0;k<3;k++){
                if(k==x)sum[j]+=a[j];
                else sum[j]+=point[k][j];
            }
        int cnt=0;
        for(int j=0;j<n;j++)
            if(sum[0]<sum[j])cnt++;
        if(cnt+1<=8)return i;
    }
    return INF;
}

int main(){
    cin>>n;
    rep(i,n) cin>>r[i];
    rep(i,n) cin>>d[0][i]>>d[1][i]>>d[2][i];
    
    rep(i,3)cal(i);
    
    int ans=INF;
    rep(i,3)ans=min(ans,check(i));
    if(ans!=INF)cout<<ans<<endl;
    else cout<<"Saiko"<<endl;
    return 0;
}

Compiler output:
a.cc:35:13: error: stray '\23' in program
   35 | int d[3][N];<U+0013>
      |             ^~~~~~~~
a.cc:36:5: error: stray '\23' in program
   36 | int <U+0013><U+0013>point[3][N],<U+0013>r[N];
      |     ^~~~~~~~
a.cc:36:6: error: stray '\23' in program
   36 | int <U+0013><U+0013>point[3][N],<U+0013>r[N];
      |             ^~~~~~~~
a.cc:36:19: error: stray '\23' in program
   36 | int <U+0013><U+0013>point[3][N],<U+0013>r[N];
      |                                 ^~~~~~~~
a.cc:49:17: error: stray '\23' in program
   49 | int a[N],sum[N];<U+0013>
      |                 ^~~~~~~~
a.cc:52:16: error: stray '\23' in program
   52 |     for(int i=1<U+0013>;i<=100;i++){
      |                ^~~~~~~~
a.cc:54:9: error: stray '\23' in program
   54 |         <U+0013>for(int j=0;j<n;j++){
      |         ^~~~~~~~
a.cc:67:42: error: stray '\23' in program
   67 |                 else sum[j]+=point[k][j];<U+0013><U+0013>
      |                                          ^~~~~~~~
a.cc:67:43: error: stray '\23' in program
   67 |                 else sum[j]+=point[k][j];<U+0013><U+0013>
      |                                                  ^~~~~~~~
a.cc:85:26: error: stray '\23' in program
   85 |     rep(i,3)ans=min(ans,c<U+0013>heck(i));
      |                          ^~~~~~~~
a.cc:86:33: error: stray '\23' in program
   86 |     if(ans!=INF)cout<<ans<<endl;<U+0013>
      |                                 ^~~~~~~~
a.cc:87:10: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |          ^~~~~~~~
a.cc:87:11: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |                  ^~~~~~~~
a.cc:87:12: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |                          ^~~~~~~~
a.cc:87:13: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |                                  ^~~~~~~~
a.cc:87:14: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |                                          ^~~~~~~~
a.cc:87:15: error: stray '\23' in program
   87 |     else <U+0013><U+0013><U+0013><U+0013><U+0013><U+0013>cout<<"Saiko"<<endl;
      |                                                  ^~~~~~~~
a.cc: In function 'int check(int)':
a.cc:63:9: error: 'memset' was not declared in this scope
   63 |         memset(sum,0,sizeof(sum));
      |         ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   12 | #include<map>
  +++ |+#include <cstring>
   13 | #define vi vector<int>
a.cc: In function 'int main()':
a.cc:85:25: error: 'c' was not declared in this scope
   85 |     rep(i,3)ans=min(ans,check(i));
      |                         ^