/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 1ms 560.0 KiB
#3 Accepted 1ms 540.0 KiB
#4 Accepted 2ms 488.0 KiB
#5 Accepted 2ms 544.0 KiB
#6 Accepted 1ms 540.0 KiB
#7 Accepted 2ms 400.0 KiB
#8 Accepted 1ms 516.0 KiB
#9 Wrong Answer 1ms 768.0 KiB
#10 Accepted 1ms 332.0 KiB
#11 Accepted 1ms 556.0 KiB
#12 Accepted 2ms 492.0 KiB
#13 Accepted 1ms 512.0 KiB
#14 Accepted 2ms 496.0 KiB
#15 Wrong Answer 2ms 540.0 KiB

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