1850H

CF1850H

带权并查集板题 维护到根的距离 #include <iostream> #include <algorithm> #include <cstring> #include <vector> #include <queue> using namespace std; const int N =2e5+1 ......
1850H 1850 CF

CF1850H The Third Letter

[题目链接](https://codeforces.com/problemset/problem/1850/H) # 题解 **知识点:贪心,图论建模。** 考虑对约束 `a b d` 建边 $a \mathop{\to}\limits^d b$ 与 $b \mathop{\to}\limits^{ ......
Letter 1850H Third 1850 The

CF1850H The Third Letter

### 题目大意 $n$ 个士兵站队,给出 $m$ 个限制,要求士兵 $b$ 站在士兵 $a$ 前面距离为 $d$ 的位置,可以有多个士兵站在同一个位置。询问给定限制下是否存在合法的列队方案。 ### 思路 我们考虑把互相有直接或间接限制的点看作一棵树,加入到树中的结点是受到限制的。 最开始的状况没 ......
Letter 1850H Third 1850 The

Codeforces 1850H:The Third Letter 带权并查集

# [1850H.The Third Letter](https://codeforces.com/contest/1850/problem/H "Codeforces 1850H") ## Description: - $n$ 个人,$m$ 个条件,每次给出两个人 $a_i$ 和 $b_i$ 一维 ......
Codeforces Letter 1850H Third 1850
共4篇  :1/1页 首页上一页1下一页尾页