Cod sursa(job #3128133)

Utilizator marap2011Paun Mara marap2011 Data 8 mai 2023 19:18:51
Problema Tribute Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("tribute.in") ;
ofstream fout("tribute.out") ;
long long n , v1 , v2 , s , x , y ;
int main()
{
    fin >> n >> v1 >> v2 ;
    for ( int i = 1 ; i <= n ; i ++ )
    {
        fin >> x >> y ;
        s = s + x + y ;
    }
    fout << s / ( ( v1 + v2) / 2 ) ;

    return 0;
}