CF834B The Festive Evening
题目描述
七月底,果冻城堡举行节日晚会!来自王国各地的客人聚集在这里讨论糖果业的新趋势。然而,这里讨论的一些事情不应该向公众披露:这些信息可能会在斯威特兰王国引起不和,以防落入坏人之手。所以有必要不让任何不速之客进来。
果冻城堡有26个入口,上面有从A到Z的大写英文字母。由于安全措施,每个客人都被指定了一个入口,他应该通过这个入口进入城堡。每个入口的门在第一个客人到达前打开,在最后一个客人到达后关闭,最后一个客人应该通过这个入口进入城堡。两位客人不能同时进入城堡。
为了保护入口免受可能的入侵,应为其分配一个糖果警卫。城堡里有k这样的守卫,所以如果打开的门超过k,其中一个就会无人看守!注意一个警卫在他被指派的门关上之前不能离开他的岗位。
Slastyona怀疑晚上可能有不速之客。她知道被邀请的客人进入城堡的顺序,想让你帮她检查一下是否有超过千扇门被打开的时刻。
输入格式
第一个行中给出了两个整数:来宾数n和守卫数k(1
输出格式
如果在一段时间内至少有一扇门无人看守,则输出“YES”,否则输出“NO”。
说明/提示
In the first sample case, the door A is opened right before the first guest's arrival and closed when the second guest enters the castle. The door B is opened right before the arrival of the third guest, and closed after the fifth one arrives. One guard can handle both doors, as the first one is closed before the second one is opened.
In the second sample case, the door B is opened before the second guest's arrival, but the only guard can't leave the door A unattended, as there is still one more guest that should enter the castle through this door.