Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int n; cin >> n;
int x_min = INT_MAX, x_max = INT_MIN;
int y_min = INT_MAX, y_max = INT_MIN;
while (n--)
{
int x, y; cin >> x >> y;
x_min = min(x, x_min);
x_max = max(x, x_max);
y_min = min(y, y_min);
y_max = max(y, y_max);
}
int x, y; cin >> x >> y;
if((x > x_min && x < x_max) && (y > y_min && y < y_max)) {
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1145 Nobita's Love for Shizuka
- Contest
- LU IUJPC : Sylhet Division 2024
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-09 05:24:42
- Judged At
- 2024-12-09 05:24:42
- Judged By
- Score
- 48
- Total Time
- 2ms
- Peak Memory
- 768.0 KiB