This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import math
def solve():
n, m = map(int, input().split())
list_1 = list(map(int, input().split()))
list_2 = list(map(int, input().split()))
curr_max = 0
curr_min = float('inf')
for i in range(n):
curr_max = max(curr_max, max(list_2[i], list_1[i]))
curr_min = min(max(list_2[i], list_1[i]), curr_min)
print(curr_min)
solve()
# | 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... |