Cod sursa(job #2887516)

Utilizator RobertuRobert Udrea Robertu Data 9 aprilie 2022 19:03:07
Problema Loto Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <bits/stdc++.h>
using namespace std;

ifstream fin("loto.in");
ofstream fout("loto.out");

int main() {
    int v[101], n, S, max = 0;
    fin >> n >> S;
    for(int i = 0; i < n; i++) {
        fin >> v[i];
        if( v[i] > max ) max = v[i];
    }
    
    if( max * 6 < S )
        fout << '-1';

    return 0;
}