新员工和导师匹配最大数
输入:
3 4
4
7
9
8
2
5
8
2
输出:
2
data1_str = input() data1_list = list(map(int, data1_str.split(" "))) m = data1_list[0] n = data1_list[1] new_emp = [] for i in range(m): new_emp.append(int(input())) mentor = [] for i in range(n): mentor.append(int(input())) new_emp.sort() mentor.sort() # print(new_emp) # print(mentor) j_flag = 0 result_count = 0 for i in range(len(new_emp)): if j_flag>(len(mentor)-1): break for j in range(j_flag+1, len(mentor)): if new_emp[i] <= mentor[j]: j_flag = j result_count += 1 break print(result_count)