Submission #995858

#TimeUsernameProblemLanguageResultExecution timeMemory
995858faqinyeagerSelf Study (JOI22_ho_t2)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; int n, m; vector<pair<ll, ll>> a; int main(){ cin >> n >> m; a.resize(n); for(int i = 0; i < n; i++) cin >> a[i].first; for(int i = 0; i < n; i++) cin >> a[i].second; sort(a.begin(), a.end()); ll ans = a[n - 1].first; for(auto x: a){ ans = min(ans, max(x.first, x.second)); } cout << ans; }
#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...