DFS
文章平均质量分 76
鸭脖yb
这个作者很懒,什么都没留下…
展开
-
埃及分数拆分——IDA*
埃及分数问题题意分析思路参考代码题意在古埃及,人们使用单位分数的和(即1/a,a是自然数)表示一切有理 数。 例如,2/3=1/2+1/6,但不允许2/3=1/3+1/3,因为在加数中不允许有相同的。 对于一个分数a/b,表示方法有很多种,其中加数少的比加数多的好,如果加数个数相 同,则最小的分数越大越好。 例如,19/45=1/5+1/6+1/18是最优方案。 输入整数a,b(0分析本题可以用d...原创 2018-04-20 23:25:57 · 2133 阅读 · 0 评论 -
dfs+剪枝
George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had orig...原创 2018-04-18 12:56:05 · 254 阅读 · 0 评论 -
素数环——Prime Ring Problem
Prime Ring ProblemA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. ...原创 2018-07-24 19:43:38 · 359 阅读 · 0 评论 -
Codeforces Round #498 (Div. 3) E题 dfs入门
Military Problemtime limit per test3 secondsmemory limit per test256 megabytesIn this problem you will have to help Berland army with organizing their command delivery system.There are nn ...原创 2018-07-26 21:22:21 · 207 阅读 · 0 评论 -
Codeforces1027D捉老鼠 图论 dfs
题目链接D. Mouse HuntMedicine faculty of Berland State University has just finished their admission campaign. As usual, about 80%80% of applicants are girls and majority of them are going to live in t...原创 2018-08-28 20:32:35 · 330 阅读 · 0 评论