Codeforces 1082C Multi-Subject Competition(前缀+思维)

NoSuchKey