
搜索-DFS
西行妖下的亡灵
这个作者很懒,什么都没留下…
展开
-
Partition problem
Given 2N people, you need to assign each of them into either red team or white team such that each team consists of exactly N people and the total competitive value is maximized.给定2N个人,你需要去把他们分配到红队或...原创 2019-07-28 23:36:16 · 181 阅读 · 0 评论 -
HDU-6468 zyb的面试(模拟十叉树+dfs)
Problem Description今天zyb参加一场面试,面试官听说zyb是ACMer之后立马抛出了一道算法题给zyb:有一个序列,是1到n的一种排列,排列的顺序是字典序小的在前,那么第k个数字是什么?例如n=15,k=7, 排列顺序为1, 10, 11, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9;那么第7个数字就是15.那么,如果你处在zyb的场...原创 2019-04-28 23:31:52 · 228 阅读 · 0 评论