本文主要是介绍AtCoder Regular Contest 076 F - Exhausted? 贪心,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
F - Exhausted?
Time limit : 2sec / Memory limit : 256MB
Score : 1000 points
Problem Statement
There are M chairs arranged in a line. The coordinate of the i-th chair (1≤i≤M) is i.
N people of the Takahashi clan played too much games, and they are all suffering from backaches. They need to sit in chairs and rest, but they are particular about which chairs they sit in. Specifically, the i-th person wishes to sit in a chair whose coordinate is not greater than Li, or not less than Ri. Naturally, only one person can sit in the same chair.
It may not be possible for all of them to sit in their favorite chairs, if nothing is done. Aoki, who cares for the health of the people of the Takahashi clan, decides to provide additional chairs so that all of them can sit in chairs at their favorite positions.
Additional chai
这篇关于AtCoder Regular Contest 076 F - Exhausted? 贪心的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!