Cod sursa(job #2292494)

Utilizator Moise_AndreiMoise Andrei Moise_Andrei Data 29 noiembrie 2018 17:15:34
Problema Orase Scor 90
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <bits/stdc++.h>
using namespace std;
ifstream in("orase.in");
ofstream out("orase.out");
int main()
{
    int a, b, mx = 0, mx2 = 0;
    while(in >> a >> b)
        mx = max(mx, a + b), mx2 = max(mx2, b - a);
    out << mx + mx2;
    return 0;
}