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 <bits/stdc++.h>
using namespace std;
struct Rectangle
{
int x1 , y1 , x2 , y2;
};
int main()
{
int nbRectangles , K;
cin >> nbRectangles >> K;
Rectangle solActu = {1 , 1 , (int)1e9 , (int)1e9};
for (int i = 0 ; i < nbRectangles ; i++)
{
Rectangle nouv;
cin >> nouv.x1>>nouv.y1>>nouv.x2>>nouv.y2;
solActu = {max(solActu.x1 , nouv.x1) , max(solActu.y1 , nouv.y1) , min(solActu.x2 , nouv.x2) , min(solActu.y2,nouv.y2) };
}
cout<<solActu.x1<<" "<<solActu.y1<<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... |