Submission #425023

#TimeUsernameProblemLanguageResultExecution timeMemory
425023MDarioHamburg Steak (JOI20_hamburg)C++11
2 / 100
403 ms14376 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...