Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) Problem D (Codeforces 831D) - 贪心 - 二分答.
Therearenpeopleandkkeysonastraightline.Everypersonwantstogettotheofficewhichislocatedonthelineaswell.Todothat,heneedstoreachsomepointwithakey,takethekeyandthengototheoffice.Onceakeyistakenbysomebody,i