Cod sursa(job #1882078)

Utilizator LizaSzabo Liza Liza Data 16 februarie 2017 22:25:40
Problema Orase Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.21 kb
#include <fstream>
using namespace std;
ifstream fi("orase.in");
ofstream fo("orase.out");
int n,m,x,y,s,d;
int main()
{
fi>>n>>m;
while(fi>>x>>y)
    {s=max(s,x+y);d=max(d,y-x);}
fo<<s+d;

    return 0;
}