B. Han Solo and Lazer Gun time limit per test 1 second memory limit ...
C. Watto and Mechanism time limit per test seconds memory limit per test megabytes input standard input output standard output Watto, the owner of a spare parts store, has recently got an order for t ...
2015-02-15 16:51 0 2990 推荐指数:
B. Han Solo and Lazer Gun time limit per test 1 second memory limit ...
C. Bank Hacking time limit per test 2 seconds ...
题意:给你三个杯子,一开始钥匙放在中间的杯子里,然后每一回合等概率将左右两个杯子中的一个与中间杯子交换。求n回合之后钥匙在中间杯子的概率。这里要求概率以分数形式输出,先化成最简,然后对1e9 + 7取 ...
C - The Football Season 先考虑求解 \[x\times w + y\times d=p \] 若存在一组解 \[\begin{cases} x_0\\ y_0 = kw + v & (0<v<w)\\ \end{cases ...
原题链接 这是一道有(du)趣(liu)的数据结构题 首先发现无修改询问,所以珂以莫队。然后发现你要维护当前的图是否为二分图,这显然珂以大力LCT维护最大生成树。然后复杂度就变成了惊人的\(O(N ...
Description An array of integers p1,p2,…,pnp1,p2,…,pn is called a permutation if it contains each ...
题目链接 题意:给定n个点,给出一些边权为0/1的边,构造完全图,满足对于任何一个三元环,三条边权和为奇。求符合条件的完全图数量,对\(1e9+7\)取模。 分析:其实原题给定的边权是love/h ...
CF1458C Latin Square 题目来源:Codeforces, Codeforces Round #691 (Div. 1), CF#691, CF1458C Latin Square 题目链接 本题题解 发现 \(\texttt{RLDU}\) 和 \(\texttt{IC ...