摘要:
Longge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some graceful algorithms. Now a problem c 阅读全文
摘要:
David the Great has just become the king of a desert country. To win the respect of his people, he decided to build channels all over his country to b 阅读全文
摘要:
题目描述 你有一支由 n 名预备役士兵组成的部队,士兵从 1 到 n 编号,要将他们拆分 成若干特别行动队调入战场。出于默契的考虑,同一支特别行动队中队员的编号 应该连续,即为形如(i,i+1,...,i+k)(i, i + 1, ..., i + k)(i,i+1,...,i+k)的序列。 编号为 阅读全文
摘要:
E. Product Oriented Recurrence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Product 阅读全文
摘要:
题目描述 设 T 为一棵有根树,我们做如下的定义: • 设 a 和 b 为 T 中的两个不同节点。如果 a 是 b 的祖先,那么称“a 比 b 不知道高明到哪里去了”。 • 设 a 和 b 为 T 中的两个不同节点。如果 a 与 b 在树上的距离不超过某个给定常数 x,那么称“a 与 b 谈笑风生” 阅读全文