摘要: discription Sereja painted n points on the plane, point number i (1 ≤ i ≤ n) has coordinates (i, 0). Then Sereja marked each point with a small or lar 阅读全文
posted @ 2018-01-17 20:31 蒟蒻JHY 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 3561: DZY Loves Math VI Description 给定正整数n,m。求 给定正整数n,m。求 Input 一行两个整数n,m。 一行两个整数n,m。 Output 一个整数,为答案模1000000007后的值。 一个整数,为答案模1000000007后的值。 Sample In 阅读全文
posted @ 2018-01-17 19:07 蒟蒻JHY 阅读(126) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-01-17 15:47 蒟蒻JHY 阅读(56) 评论(0) 推荐(0) 编辑
摘要: discriptionTao Yuanming(365-427) was a Chinese poet of Eastern Jin dynasty. One of his most famous works is "Peach Blossom Spring", which is a fable a 阅读全文
posted @ 2018-01-17 15:27 蒟蒻JHY 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Description 村子间的小路年久失修,为了保障村子之间的往来,法珞决定带领大家修路。对于边带权的无向图 G = (V, E), 请选择一些边,使得1 <= i <= d, i号节点和 n - i + 1 号节点可以通过选中的边连通,最小化选中的所有边 的权值和。 村子间的小路年久失修,为了保 阅读全文
posted @ 2018-01-17 14:49 蒟蒻JHY 阅读(359) 评论(0) 推荐(0) 编辑
摘要: discription Nick has some permutation consisting of p integers from 1 to n. A segment [l, r] (l ≤ r) is a set of elements pi satisfying l ≤ i ≤ r. Nic 阅读全文
posted @ 2018-01-17 12:38 蒟蒻JHY 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Description 给一棵m个结点的无根树,你可以选择一个度数大于1的结点作为根,然后给一些结点(根、内部结点和叶子均可)着以黑色或白色。你的着色方案应该保证根结点到每个叶子的简单路径上都至少包含一个有色结点(哪怕是这个叶子本身)。 对于每个叶结点u,定义c[u]为从根结点从U的简单路径上最后一 阅读全文
posted @ 2018-01-17 08:58 蒟蒻JHY 阅读(213) 评论(0) 推荐(0) 编辑