This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 = 1e9 + 5;
for(auto x: a){
ans = min(ans, max(x.first, x.second));
}
cout << ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |