Language: C++

#include  <iostream>
#include  <stdio.h>
#include <algorithm>
using namespace std;
#include <vector>
//#include <stack>
//#include <queue>

/*
#include <math.h>
int standerd = int(pow(10.0,9.0)) + 7;
*/
string ans_Yes = "Yes"; 
string ans_No = "No"; 
string ans_yes = "yes"; 
string ans_no = "no"; 
 

int main(){


    int N;
    cin >> N;

    vector<int> val_list[2];
    //vector<int> val_list2;
    int val;
    int index;

    for( int ni = 0 ; ni < N/2 ; ni++ ){
        for( index = 0 ; index < 2 ; index++ ){
            cin >> val;
            val_list[index].push_back(val);
        }
    }
    
    for( index = 0 ; index < 2 ; index++ ){
        sort(val_list[index].begin(),val_list[index].end());
    }

    vector<int> freq[2];
    vector<int> unique_val[2];
    for( index = 0 ; index < 2 ; index++ ){
        int unique_number=0;
        int number=0;
        unique_val[index].push_back(val_list[index][number]);
        freq[index].push_back(1);

        for( number = 1 ; number < N/2 ; number++ ){
            if(val_list[index][number]==unique_val[index][unique_number]){
                freq[index][unique_number]++;
            }else{
                unique_number++;
                unique_val[index].push_back(val_list[index][number]);
                freq[index].push_back(1);
            }
            
        }
    }

    int ans = N;
    int score;
    for( int n1 = 0 ; n1 < unique_val[0].size() ; n1++ ){
        if( N/2 - freq[0][n1] < ans){
            for( int n2 = 0 ; n2 < unique_val[1].size() ; n2++ ){
                score =          ( N/2 - freq[0][n1]);
                score =  score + ( N/2 - freq[1][n2]);
                if(unique_val[0][n1]==unique_val[1][n2]){
                    score = score + N/2;
                }
                ans = min(ans,score);
            }
        }
    }



    cout << ans;
}#include  <iostream>
#include  <stdio.h>
#include <algorithm>
using namespace std;
#include <vector>
//#include <stack>
//#include <queue>

/*
#include <math.h>
int standerd = int(pow(10.0,9.0)) + 7;
*/
string ans_Yes = "Yes"; 
string ans_No = "No"; 
string ans_yes = "yes"; 
string ans_no = "no"; 
 

int main(){


    int N;
    cin >> N;

    vector<int> val_list[2];
    //vector<int> val_list2;
    int val;
    int index;

    for( int ni = 0 ; ni < N/2 ; ni++ ){
        for( index = 0 ; index < 2 ; index++ ){
            cin >> val;
            val_list[index].push_back(val);
        }
    }
    
    for( index = 0 ; index < 2 ; index++ ){
        sort(val_list[index].begin(),val_list[index].end());
    }

    vector<int> freq[2];
    vector<int> unique_val[2];
    for( index = 0 ; index < 2 ; index++ ){
        int unique_number=0;
        int number=0;
        unique_val[index].push_back(val_list[index][number]);
        freq[index].push_back(1);

        for( number = 1 ; number < N/2 ; number++ ){
            if(val_list[index][number]==unique_val[index][unique_number]){
                freq[index][unique_number]++;
            }else{
                unique_number++;
                unique_val[index].push_back(val_list[index][number]);
                freq[index].push_back(1);
            }
            
        }
    }

    int ans = N;
    int score;
    for( int n1 = 0 ; n1 < unique_val[0].size() ; n1++ ){
        if( N/2 - freq[0][n1] < ans){
            for( int n2 = 0 ; n2 < unique_val[1].size() ; n2++ ){
                score =          ( N/2 - freq[0][n1]);
                score =  score + ( N/2 - freq[1][n2]);
                if(unique_val[0][n1]==unique_val[1][n2]){
                    score = score + N/2;
                }
                ans = min(ans,score);
            }
        }
    }



    cout << ans;
}

Compiler output:
a.cc:79:2: error: stray '#' in program
   79 | }#include  <iostream>
      |  ^
a.cc:79:3: error: 'include' does not name a type
   79 | }#include  <iostream>
      |   ^~~~~~~
a.cc:91:8: error: redefinition of 'std::string ans_Yes'
   91 | string ans_Yes = "Yes";
      |        ^~~~~~~
a.cc:13:8: note: 'std::string ans_Yes' previously declared here
   13 | string ans_Yes = "Yes";
      |        ^~~~~~~
a.cc:92:8: error: redefinition of 'std::string ans_No'
   92 | string ans_No = "No";
      |        ^~~~~~
a.cc:14:8: note: 'std::string ans_No' previously declared here
   14 | string ans_No = "No";
      |        ^~~~~~
a.cc:93:8: error: redefinition of 'std::string ans_yes'
   93 | string ans_yes = "yes";
      |        ^~~~~~~
a.cc:15:8: note: 'std::string ans_yes' previously declared here
   15 | string ans_yes = "yes";
      |        ^~~~~~~
a.cc:94:8: error: redefinition of 'std::string ans_no'
   94 | string ans_no = "no";
      |        ^~~~~~
a.cc:16:8: note: 'std::string ans_no' previously declared here
   16 | string ans_no = "no";
      |        ^~~~~~
a.cc:97:5: error: redefinition of 'int main()'
   97 | int main(){
      |     ^~~~
a.cc:19:5: note: 'int main()' previously defined here
   19 | int main(){
      |     ^~~~