Cod sursa(job #1955787)

Utilizator Andrei2000Andrei Mihailescu Andrei2000 Data 6 aprilie 2017 11:08:40
Problema Loto Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <bits/stdc++.h>
#define Nmax 100
using namespace std;
ifstream fin ("loto.in");
ofstream fout ("loto.out");
int n,S,v[Nmax];
struct tri{
    int x,y,z;
}trio;
unordered_map <int, tri> hash1;

int main()
{
    fin>>n>>S;
    for(int i=1;i<=n;++i)
        fin>>v[i];
    for(int i=1;i<=n;++i)
        for(int j=1;j<=n;++j)
            for(int k=1;k<=n;++k){
                int w=v[i]+v[j]+v[k];
                hash1[w].x=v[i];
            }
    fout<<-1<<endl;
    return 0;
}