Cod sursa(job #1845355)
| Utilizator | Data | 11 ianuarie 2017 13:23:28 | |
|---|---|---|---|
| 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;
}
