随笔分类 - 搜索-剪枝
摘要:题目链接 题目 Quite recently a creative student Lesha had a lecture on trees. After the lecture Lesha was inspired and came up with the tree of his own whic
阅读全文
摘要:题目链接 题目 Kefa decided to celebrate his first big salary by going to the restaurant. He lives by an unusual park. The park is a rooted tree consisting o
阅读全文
摘要:题目链接 题目 古埃及,人们使用单位分数的和(形如 \(\dfrac{1}{a}\) 的,\(a\) 是自然数)表示一切有理数。如:\(\dfrac{2}{3} = \dfrac{1}{2} + \dfrac{1}{6}\),但不允许 \(\dfrac{2}{3} = \dfrac{1}{3} +
阅读全文
摘要:题目链接 题目 将整数 \(n\) 分成 \(k\) 份,且每份不能为空,任意两个方案不相同(不考虑顺序)。 例如:\(n=7\),\(k=3\),下面三种分法被认为是相同的。 \(1,1,5\); \(1,5,1\); \(5,1,1\). 问有多少种不同的分法。 思路 首先我们可以打出一个暴力。
阅读全文