#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e5+7;
long long n,m,a[MAX_N],b[MAX_N];
int main(){
iostream::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for(int i = 0;i < n;i++)
cin >> a[i];
for(int i = 0;i < n;i++)
cin >> b[i];
if(m == 1){
long long mi = 1000000000000;
for(int i = 0;i < n;i++){
mi = min(max(a[i],b[i]),mi);
}
cout << mi;
return 0;
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2440 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
0 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2524 KB |
Output is correct |
11 |
Correct |
46 ms |
10788 KB |
Output is correct |
12 |
Correct |
47 ms |
10888 KB |
Output is correct |
13 |
Correct |
36 ms |
8788 KB |
Output is correct |
14 |
Correct |
38 ms |
8924 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
30 ms |
6336 KB |
Output is correct |
17 |
Correct |
47 ms |
11536 KB |
Output is correct |
18 |
Correct |
45 ms |
10836 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
30 ms |
6336 KB |
Output is correct |
3 |
Correct |
47 ms |
11536 KB |
Output is correct |
4 |
Correct |
45 ms |
10836 KB |
Output is correct |
5 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2440 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
0 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2524 KB |
Output is correct |
11 |
Correct |
46 ms |
10788 KB |
Output is correct |
12 |
Correct |
47 ms |
10888 KB |
Output is correct |
13 |
Correct |
36 ms |
8788 KB |
Output is correct |
14 |
Correct |
38 ms |
8924 KB |
Output is correct |
15 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
1 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2440 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
0 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2524 KB |
Output is correct |
11 |
Correct |
46 ms |
10788 KB |
Output is correct |
12 |
Correct |
47 ms |
10888 KB |
Output is correct |
13 |
Correct |
36 ms |
8788 KB |
Output is correct |
14 |
Correct |
38 ms |
8924 KB |
Output is correct |
15 |
Incorrect |
1 ms |
2396 KB |
Output isn't correct |
16 |
Halted |
0 ms |
0 KB |
- |