Cod sursa(job #2701653)
| Utilizator | Data | 31 ianuarie 2021 22:30:08 | |
|---|---|---|---|
| Problema | Oypara | Scor | 30 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.58 kb |
#define MAX_N 100000
#include <fstream>
#include <climits>
using namespace std;
ifstream fin("oypara.in");
ofstream fout("oypara.out");
int n, Ax, Ay, Bx, By;
struct { int x, y, z; } A[MAX_N + 1];
int main()
{
fin >> n;
Ay = 0;
By = INT_MAX;
for (int i = 1; i <= n; ++i)
{
fin >> A[i].x >> A[i].y >> A[i].z;
if (A[i].y > Ay)
{
Ax = A[i].x;
Ay = A[i].y;
}
if (By > A[i].z)
{
Bx = A[i].x;
By = A[i].z;
}
}
fout << Ax << ' ' << Ay << ' ' << Bx << ' ' << By;
fin.close();
fout.close();
return 0;
}
