atcoder 162c game tree

【题解】CF1830D Mex Tree

我们考虑这道题一看题就特别难受,所有路径?\(mex\) 之和?这是什么东西? 我们考虑 \(mex\) 之和其实是有一点诈骗的感觉,毕竟是 \(0\) 或 \(1\),还比较简单。就是路径上全都是 \(1\) 的时候是 \(0\),全都是 \(0\) 的时候是 \(1\),有 \(0\) 和 \( ......
题解 1830D 1830 Tree Mex

[GAMES101] 我的结课打卡

![](https://img2023.cnblogs.com/blog/1421720/202309/1421720-20230910205926357-293940134.png) ![](https://img2023.cnblogs.com/blog/1421720/202309/14217... ......
GAMES 101

AtCoder Beginner Contest 319 - C(模拟题)

目录C - False HopeD - Minimum Width C - False Hope 题意 给定一个 $3 \times 3 $ 的矩阵。 以一个随机的顺序先后看这 9 个数,如果说某一行或者某一列或者某一对角线上的三个数看到的先后顺序满足先看到相同的两个数,再看到不同的一个数,则此次观 ......
模拟题 Beginner AtCoder Contest 319

如何设置el-tree点箭头图标才会展开或者收起(XTHS实测)

在使用Element框架开发vue项目时,如何设置el-tree只有点击箭头图标才会展开或者收起效果呢?如图 转自:如何设置el-tree点箭头图标才会展开或者收起-百度经验 (baidu.com) ......
箭头 图标 el-tree XTHS tree

【题解】 AtCoder Beginner Contest 319

没有写 F,不确定我的做法对不对。 评价:什么牛逼场次,代码大赛是嘛,从 A 开始就感觉到不对了,而且题面写的真答辩。 A.Legendary Players 题目分析: 直接按题目模拟即可。 代码: 点击查看代码 #include<bits/stdc++.h> using namespace st ......
题解 Beginner AtCoder Contest 319

AtCoder Beginner Contest 319

A - Legendary Players (abc319 A) 题目大意 给定rating前10的选手名字和对应分数。 给定名字,问对应分数。 解题思路 复制一下,建个数组,然后一个一个判断即可。Python更好写一点。 神奇的代码 #include <bits/stdc++.h> using n ......
Beginner AtCoder Contest 319

$AtCoder Beginner Contest 319$

\(A - Legendary Players\) map<char ,int >mp; void solve(){ string s; cin>>s; cout<<mp[s[0]]<<'\n'; //puts(ans>0?"YES":"NO"); //puts(ans>0?"Yes":"No"); ......
Beginner AtCoder Contest 319

[题解] CF29D Ant on the Tree

CF29D Ant on the Tree 题目知识点:LCA。 题目传送门 题意 给定一棵以 \(1\) 为节点的树,再给定树的所有叶子节点的一个序列。 现在执行一个操作:从 \(1\) 开始遍历每个节点,并返回根,要求每条边经过的次数一定为 \(2\) 。 问是否能够使得访问节点序列中叶子节点的 ......
题解 Tree 29D Ant the

【题解】CF1830A Copil Copac Draws Trees

你考虑对于每一条边打上时间标记,然后在树上 `DFS` 的时候维护一下以 $u$ 为根的答案即可,然后将答案合并,反正很简单,看代码就懂。 **code:** ```cpp #include using namespace std; const int NN = 2e5 + 8; int t,n; ......
题解 1830A Copil Copac Draws

【题解】CF1854E Game Bundles

你考虑我们需要构造出一组解,显然地这样的解有很多很多种(${60^{60}}$ 显然是及其地大)。 那关键是我们如何进行构造。 我们很容易知道每个集合里面 $> 30$ 的数只有一个。 所以我们可以在 $[1,30]$ 中随机 $a_i$,直到满足的组数恰好小于等于 $a_i$,添加的时候维护数组 ......
题解 Bundles 1854E 1854 Game

【题解】AtCoder Regular Contest 161

评价:感觉这场题目质量不咋地啊,都是一些乱搞题 ## A.Make M ### 题目描述: $N$ 是一个正奇数。我们称一个长度为 $N$ 的序列 $S$ 是 **M 型**序列,当前仅当对于所有的 $i=2,4,6,\dots,N-1$(即偶数位),都有 $S_{i-1}S_{i+1}$。 现在给 ......
题解 AtCoder Regular Contest 161

题解 CF1787G【Colorful Tree Again】

## problem 贼眉鼠眼有一棵 $N$ 个节点的树,这棵树很特殊,每条边都有边权和颜色。 果宝特攻会不定时来进攻贼眉鼠眼。具体地,在前 $Q$ 个时刻,在每个时刻,会发生以下两个事件之一: 1. 果宝特攻摧毁了树上的一个节点 $u$。 1. 贼眉鼠眼修复了树上的一个节点 $u$。 定义一条简单 ......
题解 Colorful 1787G Again 1787

CF868E Policeman and a Tree 题解

### Description. 树上警察抓小偷。一名警察速度为 $1$,多名小偷速度为 $+\infty$,问多长时间抓到。 树点数 $\le 50$ ### Solution. 首先不可能抓不到。 其次步数不可能超过 $2500$(每抓完一个小偷走一遍全图)。 这启发我们可以直接暴搜每一步,并记 ......
题解 Policeman 868E Tree 868

elementui tree 获取选中子节点的所有父级节点信息

```javascript // 获取选中的节点 const checkedNodes = this.$refs.rolePermissionsTree.getCheckedNodes(false, true) // 获取选中节点的所有父级节点 checkedNodes.forEach(node = ......
节点 中子 elementui 信息 tree

P2633 Count on a tree 题解(外加DFS序求LCA)

`2023-07-22 09:53:59 顶置3` # P2633 Count on a tree ## 前置小知识 # 冷门小科技:DFS-RMQ 求LCA 最近跟着洛谷榜一的博客学了一个冷门科技:DFS序求LCA,这道题刚好要求LCA,所以就刚好适用一下。 [$\color{Red}{原博客地址 ......
题解 P2633 Count 2633 tree

CF1806E Tree Master

`2023-07-19 10:59:11` 思路来源于题解:https://www.luogu.com.cn/problem/solution/CF1806E 算法:根号分治+记忆化搜索。 因为每一个查询都是同层的,我们可以只记忆层数少的(小于$\sqrt n$),对于层数多的层,如果大于$ \sq ......
Master 1806E 1806 Tree CF

Euclid's Game题解

这是一道~~比较简单~~的博弈论。 我们假设 $x \ge y$,那么此时可以分两种情况讨论: - $x using namespace std; #define int long long inline int read(){ int f=1,w=0; char c=getchar(); whil ......
题解 Euclid Game 39

【题解】AtCoder Regular Contest 162

## A.Ekiden Race ### 题目描述: 有 $n$ 个人参加了往返赛跑,每个人有一个编号 $1$ 到 $n$。已知以下信息: - 如果按照往路的成绩排序,那么任何两个人的成绩都不相同。同时第 $i$ 个人在往路中排名第 $i$。 - 如果按照往返的成绩排序,那么任何两个人的成绩都不相同 ......
题解 AtCoder Regular Contest 162

AtCoder Grand Contest 041 F Histogram Rooks

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc041_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc041/tasks/agc041_f "AtCoder 传送门") 神题!!!!!!! ......
Histogram AtCoder Contest Grand Rooks

AtCoder Beginner Contest 318 - D(状压 dp)

[toc] # [D - General Weighted Max Matching](https://atcoder.jp/contests/abc318/tasks/abc318_d) **题意** 给定无向图,边有边权。让你选择一组边,满足任意两边不相交且总边权和最大。 顶点数 $\le 16 ......
Beginner AtCoder Contest 318 dp

[题解] AtCoder Beginner Contest 308 A~G

# AtCoder Beginner Contest 308 A~G ## A. New Scheme ```cpp void Main() { vector a(8); for (auto &x : a) cin >> x; if (!is_sorted(a.begin(), a.end()) & ......
题解 Beginner AtCoder Contest 308

[题解] CF1328E Tree Queries

# CF1328E Tree Queries ## 题意 给定一棵以 $1$ 为根节点的有根树。 现在有 $q$ 次询问,每次询问给定 $m$ 个节点,问是否存在一条从根节点开始的链,使得每个节点到这条链的距离不超过 $1$ 。 ## 思路 我们首先可以给出一个结论:如果节点 $v$ 与一条链的距离 ......
题解 Queries 1328E 1328 Tree

AtCoder Beginner Contest 216

Tasks - AtCoder Beginner Contest 216 [ABC216D] Pair of Ball 可以发现对于栈中每个元素是被他上面的元素所约束,用拓扑排序表示这种约束 [ABC216F] Max Sum Counting dp合集 [ABC216G] 01Sequence 差 ......
Beginner AtCoder Contest 216

AtCoder Grand Contest 064

# Preface AGC好难啊,从C题开始就一点不会了,感觉以前OI时候的AGC没那么变态的啊,也许是我变菜好多了吧 # **A - i i's** 考虑先放一个这样的序列: $$ n,n-1,n,n-1,n\cdots,n-1,n,n-2 $$ 这样就把$n,n-1$都用完了,同时还用了个$n- ......
AtCoder Contest Grand 064

CF1695D2 Tree Queries (Hard Version)

[原题](https://codeforces.com/problemset/problem/1695/D2) [翻译](https://www.luogu.com.cn/problem/CF1695D2) $$ \large{\color{#ff0000}{\text{被xjk搏杀了,wtcl}} ......
Queries Version 1695D 1695 Tree

树形结构el-tree选中子类时候,获取当前子类和所有上级父类id

选中子类时候,获取当前子类和所有上级父类id <el-tree :data="permissionsData" show-checkbox node-key="id" ref="tree" highlight-current :default-checked-keys=defaultPermissi ......
子类 树形 上级 el-tree 时候

error: The following untracked working tree files would be overwritten by merge

错误内容如下: error: The following untracked working tree files would be overwritten by merge: xxx/xxx/xxx/xxx/xxx/xxx/xxx.java Please move or remove them b ......

B. Fedor and New Game

## B. Fedor and New Game https://codeforces.com/problemset/problem/467/B ```python """ 467B 思路: 1.暴力方法: 通过循环二进制之后的,逐个位与fedor进行判断,通过取余,如果最后不同的超过3个就计+1 ......
Fedor Game and New

Minimum Edge Weight Equilibrium Queries in a Tree

Minimum Edge Weight Equilibrium Queries in a Tree There is an undirected tree with n nodes labeled from 0 to n - 1. You are given the integer n and a ......
Equilibrium Minimum Queries Weight Edge

[CF1830D] Mex Tree

## 题目描述 You are given a tree with $ n $ nodes. For each node, you either color it in $ 0 $ or $ 1 $ . The value of a path $ (u,v) $ is equal to the ME ......
1830D 1830 Tree Mex CF