solved curriculum compactness constraint