#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
256 KB |
Output is correct |
2 |
Correct |
8 ms |
256 KB |
Output is correct |
3 |
Correct |
7 ms |
256 KB |
Output is correct |
4 |
Correct |
7 ms |
384 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
256 KB |
Output is correct |
2 |
Correct |
8 ms |
256 KB |
Output is correct |
3 |
Correct |
7 ms |
256 KB |
Output is correct |
4 |
Correct |
7 ms |
384 KB |
Output is correct |
5 |
Correct |
666 ms |
356 KB |
Output is correct |
6 |
Correct |
660 ms |
360 KB |
Output is correct |
7 |
Correct |
677 ms |
256 KB |
Output is correct |
8 |
Correct |
664 ms |
356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
7 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
8 ms |
256 KB |
Unexpected end of file - int32 expected |
2 |
Halted |
0 ms |
0 KB |
- |