Cod sursa(job #1954869)
Utilizator | Data | 5 aprilie 2017 18:22:09 | |
---|---|---|---|
Problema | Orase | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.21 kb |
#include <fstream>
using namespace std;
ifstream f("orase.in");
ofstream g("orase.out");
int d,l,st,dr;
int main()
{
f>>d>>l;
while(f>>d>>l)
st=max(st,d+l),dr=max(dr,l-d);
g<<st+dr;
}