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