随笔分类 - 信息学竞赛
摘要:Description 村子间的小路年久失修,为了保障村子之间的往来,法珞决定带领大家修路。对于边带权的无向图 G = (V, E), 请选择一些边,使得1 <= i <= d, i号节点和 n - i + 1 号节点可以通过选中的边连通,最小化选中的所有边 的权值和。 村子间的小路年久失修,为了保
阅读全文
摘要:Input 第一行有两个整数,N和 M,描述方块的数目。 接下来 N行, 每行有 M 个非负整数, 如果该整数为 0, 则该方块为一个景点;否则表示控制该方块至少需要的志愿者数目。 相邻的整数用 (若干个) 空格隔开,行首行末也可能有多余的空格。 第一行有两个整数,N和 M,描述方块的数目。 接下来
阅读全文
摘要:组合数取模问题是信息学竞赛里面的竞赛问题,形如$\binom{n}{m}\%p$,当p是质数的时候,我们可以采用lucas定理来做。 1.lucas定理的形式 把n和m写成p进制的形式: $n=\left ( a_{0}a_{1}a_{2} ...a_{k}\right )_{p}$ $m=\lef
阅读全文
摘要:Description Everyone knew it would only be a matter of time. So what? Faced for years on, a peril becomes the every-day reality. It loses its meaning.
阅读全文
摘要:The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest num
阅读全文
摘要:50分的做法: 50分的程序: 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define lc (x<<1) 4 #define rc (x<<1|1) 5 #define mid (l+r>>1) 6 int const N=100000
阅读全文

浙公网安备 33010602011771号