Login
Register
QOJ.ac
QOJ
QOJ
Contests
Category
Problems
Submissions
Hack!
Blogs
PKU v. THU (Preliminary Round 2)
Time Limit: 1 s
Memory Limit: 256 MB
# 5011. Course Selection
Statistics
Statement
Submit
Custom Test
The problem was used in the following contest:
23 October, 2022 — Waterloo local contest
Sample Input
6 3 1 2 3 1 1 1 1 2 3 4 5 1 2 3 4 5 1 2 3 4 6
Sample Output
9 1 2 3 4 5 2 3 3 6
Submit
Run