Cod sursa(job #2358844)

Utilizator riordache58Razvan Iordache riordache58 Data 28 februarie 2019 13:28:37
Problema Orase Scor 10
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <bits/stdc++.h>
#include <fstream>

using namespace std;

ifstream f("orase.in");
ofstream g("orase.out");

long long int d , l , maxx1 = 0 , maxx2 = 0;

int main()
{
while ( f >> d >> l )

    maxx1 = max ( maxx1 , d + l );
    maxx2 = max ( maxx2 , l - d );

    g << maxx1 + maxx2;

    return 0;
}