Cod sursa(job #2418101)

Utilizator ALEx6430Alecs Andru ALEx6430 Data 3 mai 2019 16:33:32
Problema Elementul majoritar Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.42 kb
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;

ifstream in("elmaj.in");
ofstream out("elmaj.out");

int main()
{
    ios_base::sync_with_stdio(0);
    in.tie(0);
    out.tie(0);

    int n;
    in >> n;

    vector<int> v(n+1);
    for(int i = 0; i < n; i++) in >> v[i];

    sort(v.begin(),v.end());

    int el = v[n/2];
    for(int i = 0; i < )

    return 0;
}