[CCC 2015 S3] Gates
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
机场有 个登机口,你需要按顺序安排 架飞机,第 架飞机只能使用 号登机口,一个登机口永久只能被一架飞机使用。当没有登机口可以供某架飞机使用时机场便会关闭,之后的飞机都不能登机。
请确定一种方案,使得有登机口的飞机数量最多。
输入格式
第一行一个整数 。
第二行一个整数 。
接下来 行,每行一个整数 。
输出格式
一行一个整数,表示最多能安排的飞机数量。
4
3
4
1
1
2
4
6
2
2
3
3
4
4
3
提示
【数据范围】:
对于 的数据,。
对于 的数据,,。
本题中 Subtask 0 为原题数据,Subtask 1 为 Hack 数据,Hack 数据不计分。
练习
- Status
- Done
- Rule
- IOI
- Problem
- 9
- Start at
- 2023-11-15 7:00
- End at
- 2023-11-15 17:00
- Duration
- 10 hour(s)
- Host
- Partic.
- 12