https://www.acmicpc.net/problem/13164

조건에 학생이 오름차순 정렬된 게 아니면
시간복잡도 얼마에 해결 가능할까
일단 O( n^2 k)dp가 떠오르는데 줄일수있을까