#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define float double
int main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
ll n, m;cin>>n>>m;
vector<ll>a(n), b(n);
for(int i=0;i<n;i++)cin>>a[i];
for(int i=0;i<n;i++)cin>>b[i];
ll mn = INT_MAX;
for(int i=0;i<n;i++){
mn = min(mn, max(a[i], b[i]));
}
cout<<mn<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
460 KB |
Output is correct |
8 |
Correct |
0 ms |
452 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
52 ms |
10760 KB |
Output is correct |
12 |
Correct |
50 ms |
10832 KB |
Output is correct |
13 |
Correct |
37 ms |
8848 KB |
Output is correct |
14 |
Correct |
42 ms |
8788 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
24 ms |
6228 KB |
Output is correct |
17 |
Correct |
51 ms |
11536 KB |
Output is correct |
18 |
Correct |
53 ms |
10760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
24 ms |
6228 KB |
Output is correct |
3 |
Correct |
51 ms |
11536 KB |
Output is correct |
4 |
Correct |
53 ms |
10760 KB |
Output is correct |
5 |
Incorrect |
0 ms |
348 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 |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
460 KB |
Output is correct |
8 |
Correct |
0 ms |
452 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
52 ms |
10760 KB |
Output is correct |
12 |
Correct |
50 ms |
10832 KB |
Output is correct |
13 |
Correct |
37 ms |
8848 KB |
Output is correct |
14 |
Correct |
42 ms |
8788 KB |
Output is correct |
15 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 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 |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
460 KB |
Output is correct |
8 |
Correct |
0 ms |
452 KB |
Output is correct |
9 |
Correct |
1 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
604 KB |
Output is correct |
11 |
Correct |
52 ms |
10760 KB |
Output is correct |
12 |
Correct |
50 ms |
10832 KB |
Output is correct |
13 |
Correct |
37 ms |
8848 KB |
Output is correct |
14 |
Correct |
42 ms |
8788 KB |
Output is correct |
15 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |