Created
July 7, 2018 01:54
-
-
Save hoasung01/fdd8655159568ec38e6c49f4413652a2 to your computer and use it in GitHub Desktop.
codeforces_problem_572_A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### home exercise #### | |
# http://codeforces.com/problemset/problem/572/A | |
# wrong test case 6: | |
# Input | |
# 3 3 | |
# 1 1 | |
# 1 2 3 | |
# 1 2 3 | |
# Output | |
# NO | |
# Answer | |
# YES | |
na, nb = map(int, input().split()) | |
k, m = map(int, input().split()) | |
item_list_na = list(map(int, input().split())) | |
item_list_nb = list(map(int, input().split())) | |
def process(array_a, array_b): | |
result = False | |
for i in array_a: | |
for j in array_b: | |
if i < j: | |
result = True | |
else: | |
result = False | |
return result | |
return result | |
if(process(item_list_na[0:k], item_list_nb[0:m]) == False): | |
print('NO') | |
else: | |
print('YES') | |
#### home exercise #### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment