|
|
вернуться в форумWA 4 n = int(input()) m = [] SIZE = 30001 result = [0] * SIZE for i in range(n): m.append(list(map(int,input().split()))) m.sort(key = lambda x: x[1]) for i in range(n): start = m[i][0] end = m[i][1] fail = 0 for j in range(start): fail = max(fail,result[j]) result[end] = fail + 1 maxn = 0 for i in range(SIZE): maxn = max(maxn, result[i]) print(maxn) what`s wrong ? Edited by author 25.11.2022 03:04 Edited by author 25.11.2022 03:04 |
|
|