上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
该文被密码保护。 阅读全文
posted @ 2020-01-14 09:50 OItby 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Description 在魔方风靡全球之后,RUBIK先生发明了它的简化版——魔板 如上表所示,魔板由8个同样大小的方块组成,每个方块的颜色均不相同,本题中分别用数字1 8表示,它们可能出现在魔板的任一位置。任一时刻魔板的状态都可以用方块的颜色序列表示:从魔板的左上角开始,按顺时针方向依次写下各方块 阅读全文
posted @ 2020-01-01 17:58 OItby 阅读(286) 评论(0) 推荐(0) 编辑
摘要: Description The 15 puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 slidin 阅读全文
posted @ 2020-01-01 13:28 OItby 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description 如果一棵树的所有非叶节点都恰好有n个儿子,那么我们称它为严格n元树。如果该树中最底层的节点深度为d(根的深度为0),那么我们称它为一棵深度为d的严格n元树。例如,深度为2的严格2元树有三个,如下图: 给出n, d,编程数出深度为d的n元树数目。 Input 仅包含两个整数n, 阅读全文
posted @ 2019-12-28 16:00 OItby 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Description FGD想从成都去上海旅游。在旅途中他希望经过一些城市并在那里欣赏风景,品尝风味小吃或者做其他的有趣的事情。经过这些城市的顺序不是完全随意的,比如说FGD不希望在刚吃过一顿大餐之后立刻去下一个城市登山,而是希望去另外什么地方喝下午茶。幸运的是,FGD的旅程不是既定的,他可以在某 阅读全文
posted @ 2019-12-21 20:54 OItby 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Description You are given a tree, it’s root is p, and the node is numbered from 1 to n. Now define f(i) as the number of nodes whose number is less th 阅读全文
posted @ 2019-12-21 19:36 OItby 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Description There is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has 阅读全文
posted @ 2019-12-21 17:08 OItby 阅读(164) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-12-21 15:55 OItby 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Description After going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities 阅读全文
posted @ 2019-12-14 13:04 OItby 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Description 给一棵m个结点的无根树,你可以选择一个度数大于1的结点作为根,然后给一些结点(根、内部结点和叶子均可)着以黑色或白色。你的着色方案应该保证根结点到每个叶子的简单路径上都至少包含一个有色结点(哪怕是这个叶子本身)。 对于每个叶结点u,定义c[u]为从根结点从U的简单路径上最后一 阅读全文
posted @ 2019-12-14 09:22 OItby 阅读(146) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页