Submission #425023

# Submission time Handle Problem Language Result Execution time Memory
425023 2021-06-12T12:32:24 Z MDario Hamburg Steak (JOI20_hamburg) C++11
2 / 100
403 ms 14376 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define L first.first
#define R first.second
#define U second.first
#define D second.second
ll n, k;
pair<pair<ll, ll>, pair<ll, ll>> p[200001];
int main(){
    cin >> n >> k;
    for(int i=0; i<n; i++){
        cin >> p[i].L >> p[i].D >> p[i].R >> p[i].U;
    }
    sort(p, p+n);
    ll l=p[0].D, r=p[0].U;
    for(int i=1; i<n; i++){
        r=min(r, p[i].U);
        l=max(l, p[i].D);
    }
    cout << p[n-1].L << " " << l;
    return 0;
}
/*
3 1

*/
# Verdict Execution time Memory Grader output
1 Correct 4 ms 332 KB Output is correct
2 Correct 6 ms 348 KB Output is correct
3 Correct 4 ms 420 KB Output is correct
4 Correct 4 ms 332 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 332 KB Output is correct
2 Correct 6 ms 348 KB Output is correct
3 Correct 4 ms 420 KB Output is correct
4 Correct 4 ms 332 KB Output is correct
5 Correct 373 ms 14376 KB Output is correct
6 Correct 374 ms 14224 KB Output is correct
7 Correct 403 ms 14304 KB Output is correct
8 Correct 368 ms 14180 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 6 ms 332 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -