#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n,m; cin>>n>>m;
vector<ll> a(n), b(n);
for (auto &i: a) cin>>i;
for (auto &i: b) cin>>i;
ll ans=1e18;
for (int i=0; i<n; i++) {
ans=min(ans,max(a[i],b[i]));
}
cout<<ans;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
436 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
166 ms |
10744 KB |
Output is correct |
12 |
Correct |
163 ms |
10740 KB |
Output is correct |
13 |
Correct |
133 ms |
8692 KB |
Output is correct |
14 |
Correct |
120 ms |
8704 KB |
Output is correct |
15 |
Correct |
0 ms |
600 KB |
Output is correct |
16 |
Correct |
64 ms |
6228 KB |
Output is correct |
17 |
Correct |
176 ms |
11512 KB |
Output is correct |
18 |
Correct |
163 ms |
10832 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
600 KB |
Output is correct |
2 |
Correct |
64 ms |
6228 KB |
Output is correct |
3 |
Correct |
176 ms |
11512 KB |
Output is correct |
4 |
Correct |
163 ms |
10832 KB |
Output is correct |
5 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
436 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
166 ms |
10744 KB |
Output is correct |
12 |
Correct |
163 ms |
10740 KB |
Output is correct |
13 |
Correct |
133 ms |
8692 KB |
Output is correct |
14 |
Correct |
120 ms |
8704 KB |
Output is correct |
15 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
436 KB |
Output is correct |
6 |
Correct |
1 ms |
344 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
166 ms |
10744 KB |
Output is correct |
12 |
Correct |
163 ms |
10740 KB |
Output is correct |
13 |
Correct |
133 ms |
8692 KB |
Output is correct |
14 |
Correct |
120 ms |
8704 KB |
Output is correct |
15 |
Incorrect |
0 ms |
600 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |