This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
const int COORD_MAX = 1e9;
int N, K;
int main()
{
ios::sync_with_stdio(false);
cin >> N >> K;
int xBasRect = 0, yBasRect = 0, xHautRect = COORD_MAX + 1, yHautRect = COORD_MAX + 1;
for(int i = 0; i < N; i++)
{
int xBas, yBas, xHaut, yHaut;
cin >> xBas >> yBas >> xHaut >> yHaut;
xBasRect = max(xBasRect, xBas);
yBasRect = max(yBasRect, yBas);
xHautRect = min(xHaut, xHautRect);
yHautRect = min(yHaut, yHautRect);
}
cout << xBasRect << " " << yBasRect << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |