题解 | #欢迎入营#
欢迎入营
https://ac.nowcoder.com/acm/problem/219876
当时写的超时了,其实还是挺简单的
n = int(input()) student = [int(i) for i in input().strip().split()] taxi = [int(i) for i in input().strip().split()] student.sort(reverse=True) taxi.sort(reverse=True) ans = 1 pos = 0 for i in range(n): while pos <= n-1 and taxi[pos] >= student[i]: pos += 1 ans = ans * (pos-i) % 100000007 print(ans)