题面 Time limit per test: 2 seconds Memory limit per test: 256 megabytes Description You are giv ...
题目链接 https: vjudge.net problem CodeForces F 题面 Description You are given a string s of length n consisting of lowercase Latin letters. You may apply some operations to this string: in one operation yo ...
2019-03-08 12:47 3 362 推荐指数:
题面 Time limit per test: 2 seconds Memory limit per test: 256 megabytes Description You are giv ...
F. Xor-Paths time limit per test 3 seconds ...
题目大意:给定一个序列,求其中最长严格上升子序列长度及其个数。 序列按如下方式给出:给定 \(n(1\leq n\leq 50)\) 和序列中的第一个数 \(x(-10^9\leq x\leq 10 ...
题目传送门:CF1278F。 题意简述: 有 \(n\) 个独立随机变量 \(x_i\),每个随机变量都有 \(p = 1/m\) 的概率取 \(1\),有 \((1-p)\) 的概率取 \(0\)。 令 \(\displaystyle \Sigma x = \sum_{i=1}^{n ...
题目大意 如果两棵树可以通过重标号后变为完全相同,那么它们就是同构的。 将中间节点定义为度数大于 \(1\) 的节点。计算由 \(n\) 个节点,其中所有的中间节点度数都为 \(d\) 的互不同构 ...
Codeforces 1296F Berland Beauty 传送门:https://codeforces.com/contest/1296/problem/F 题意: 给你一个n个点的树,树有边权 现在有m个限制条件,表示点u到点v路径上的最小值是w 现在让我们构造这个树的边权 ...
Description 给定一棵大小为 $n$ 的树和 $m$ 条链 $(u, v)$。统计有多少对链,满足这两条链恰好有一个交点。 $n, m \le 3 \times 10^5$ ...
传送门 这个题一眼 $dp$ 就是设 $f[i][0/1]$ 表示我们只考虑前 $i$ 个位置,并且保证覆盖了前 $i$ 个位置,当前位置 选/不选 的最小代价 考虑转移,设题目给出的字符串为 $s$ 首先 $f[i][0]$ 必须从 $f[j][1]$ 转移过来,其中 $ j+k> ...