colorful 133f tree abc

abc260_e At Least One 题解

# [At Least One](https://vjudge.csgrandeur.cn/problem/AtCoder-abc260_e) ## 题意 给定一个整数 $m$ 和 $n$ 对数 $(a_i, b_i)$,我们定义一个 $f(x)$ 函数表示满足以下要求的整数序列数量: - 整数序列 ......
题解 Least abc 260 One

AT_abc_271_f 总结

题目:AT_abc_271_f 链接:[洛谷](https://www.luogu.com.cn/problem/AT_abc271_f),[AT](https://atcoder.jp/contests/abc271/tasks/abc271_f),[vjudge](https://vjudge. ......
AT_abc 271 abc AT

AT_abc271_e 总结

题目:AT_abc271_e 链接:[洛谷](https://www.luogu.com.cn/problem/AT_abc271_e),[AT](https://atcoder.jp/contests/abc271/tasks/abc271_e),[vjudge](https://vjudge.c ......
AT_abc 271 abc AT

abc273_e Notebook 题解

# [Notebook](https://vjudge.csgrandeur.cn/problem/AtCoder-abc273_e) ## 题意 有 $q$ 次操作。 现在你有一个空序列 $a$ 和一本 $10^9$ 页的笔记本,每页纸上都有一个空序列。 每次操作是以下四种中的一种: - `ADD ......
题解 Notebook abc 273

1110 Complete Binary Tree(附测试点2,3,4,6分析)

题目: Given a tree, you are supposed to tell if it is a complete binary tree. Input Specification: Each input file contains one test case. For each case ......
Complete Binary 1110 Tree

abc271_f XOR on Grid Path 题解

# [XOR on Grid Path](https://vjudge.csgrandeur.cn/problem/AtCoder-abc271_f) ## 题意 有一个 $n \times n$ 的整数矩阵,第 $i$ 行 $j$ 列的数字为 $a_{i,j}$。 你站在 $(1,1)$,每次你可 ......
题解 Grid Path abc 271

Tree-of-Thought

引言 人工智能的发展一直以来都是实现智能系统推理能力的主要目标之一。近年来,大型语言模型的发展取得了重大进展,特别是它们在上下文学习方面的应用,为机器推理开辟了新的途径,但其在复杂推理方面仍面临挑战。为此今天分享的这篇文章,介绍了一种名为“Tree-of-Thought(ToT)”的框架,旨在提高自 ......
Tree-of-Thought Thought Tree of

[ABC143E] Travel by Car

[Travel by Car 的 传送门](https://www.luogu.com.cn/problem/AT_abc143_e) > $n\le300$ 可~~凭感觉~~进行一遍 Floyd。 然后选两个点 $i,j$,如果 $i,j$ 间的距离小于等于 $l$,则将 $i,j$ 连一条代价为 ......
Travel 143E ABC 143 Car

Paper Reading: forgeNet a graph deep neural network model using tree-based ensemble classifiers for feature graph construction

[toc] Paper Reading 是从个人角度进行的一些总结分享,受到个人关注点的侧重和实力所限,可能有理解不到位的地方。具体的细节还需要以原文的内容为准,博客中的图表若未另外说明则均来自原文。 | 论文概况 | 详细 | | | | | 标题 | 《forgeNet: a graph dee ......

ABC134F 题解

[$\text{link}$](https://www.luogu.com.cn/problem/AT_abc134_f) 。难想的 $\texttt{dp}$ 。 ![](https://img2023.cnblogs.com/blog/2803184/202305/2803184-2023052 ......
题解 134F ABC 134

1127 ZigZagging on a Tree

题目: Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and ......
ZigZagging 1127 Tree on

1099 Build A Binary Search Tree

题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no ......
Binary Search Build 1099 Tree

abc271_e Subsequence Path 题解

# [Subsequence Path](https://vjudge.csgrandeur.cn/problem/AtCoder-abc271_e) ## 题意 有 $n$ 个城市和 $m$ 条有向道路,编号从 $1$ 开始,第 $i$ 条道路从 $a_i$ 到 $b_i$,长度为 $c_i$。 ......
题解 Subsequence Path abc 271

ABC146E 题解

## 前言 [题目传送门!](https://www.luogu.com.cn/problem/AT_abc146_e) [更好的阅读体验?](https://www.cnblogs.com/liangbowen/p/17421804.html) 简单题,whk 的时候就秒了,但是不知道为什么很喜欢 ......
题解 146E ABC 146

Atcoder Beginner Contest ABC302 题解

# 代码 见此:。 # A Attack 直接计算 `a/b`,有余数的话答案加一。 # B Find Snuke 枚举每个点,向周围八个方向拓展,判断。 # C Almost Equal 全排列枚举字符串顺序,之后检查。 $O(n)$ 做法:咕。(应该有罢 # D Impartial Gift 双 ......
题解 Beginner Atcoder Contest ABC

[atARC153F]Tri-Colored Paths

称一条边在**环外**当且仅当其两端点不全在环上 用总方案数减去不合法的方案数,并分类讨论—— - **Case1:**图中不存在某种颜色的边 - 否则,若存在简单环的颜色集合为$\{1,2,3\}$,则环上每种颜色的边恰有一条 > 否则,若颜色为$1$的边数$\ge 2$,则去掉其中一条后得到的简 ......
Tri-Colored Colored atARC Paths 153F

abc271_c Manga 题解

# [Manga](https://vjudge.csgrandeur.cn/problem/AtCoder-abc271_c) ## 题意 有一部连载漫画,共 $10^9$ 卷,你手上有 $n$ 卷漫画,第 $i$ 卷是连载中的第 $a_i$ 卷。 **你在看漫画之前**,可以执行以下操作若干次( ......
题解 Manga abc 271

1043 Is It a Binary Search Tree (附测试点7分析)

题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no ......
Binary Search 1043 Tree Is

ElementUI tree 折叠全部节点

第一 引入树组件,需要通过按钮来控制展开/折叠必须要配置 ref 属性和node-key,树数据要和node-key能匹配 <template> <el-button @click="foldTree">折叠全部节点</el-button> <el-button @click="expandTree ......
节点 ElementUI tree

1064 Complete Binary Search Tree

题目: A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only no ......
Complete Binary Search 1064 Tree

[ABC230D] Destroyer Takahashi 题解

[题目传送门](https://www.luogu.com.cn/problem/AT_abc230_d) 一道贪心题。 我们可以将每一堵墙的右端点从小到大进行排序,然后我们从第 $1$ 堵墙开始看,将在第 $1$ 堵墙的右端点打破后会倒塌的墙全部跳过,去看下一堵还没被打破的墙。可以证明这是最优解。 ......
题解 Destroyer Takahashi 230D ABC

AT_abc302_f 题解

一、题目描述: 给你 $n$ 个集合 ,第 $i$ 个集合有 $A_i$ 个数,集合里的数都小于等于 $m$。 你可以选择两个至少有一个相同元素的集合,生成它们的并集,然后这两个集合消失。 求最少多少次合并之后,数字 $1$ 和 $m$ 在同一个集合中。如果不可能,请输出 $-1$ 。 数据范围:$ ......
题解 AT_abc 302 abc AT

【题解】Atcoder ABC302 F,G,Ex

完全不会 G 和 Ex,这些套路还是要积累一下的。 ## F.Merge Set ### 题目描述: 给定 $n$ 个集合,每次可以合并两个有交的集合,问最少多少次合并可以让 $1$ **和** $m$ 位于同一个集合中。 ### 题目分析: 一开始将题读成了将 $[1,m]$ 位于同一个集合中,然 ......
题解 Atcoder ABC 302 Ex

abc302 题解

打的还行,加的分不多。 # [A](https://atcoder.jp/contests/abc302/tasks/abc302_a "A") 直接除完上取整即可。 ```cpp #include using namespace std; typedef long long LL; const i ......
题解 abc 302

ABC302

## T1:[Attack](https://atcoder.jp/contests/abc302/tasks/abc302_a) 答案为 $\lceil\frac{A}{B}\rceil$ 代码实现 ``` a, b = map(int, input().split()) print((a+b-1 ......
ABC 302

AT_abc_270_d 总结

题目:AT_abc_270_d 链接:[洛谷](https://www.luogu.com.cn/problem/AT_abc270_d), [AT](https://atcoder.jp/contests/abc270/tasks/abc270_d),[vjudge](https://vjudge ......
AT_abc 270 abc AT

AT_abc270_f 总结

# 题意 - 有 $n$ 个岛屿,可以分别花 $x_i,y_i(1 \le i \le n)$ 的代价在岛屿 $i$ 建一个机场和港口,一个花 $z_i(1 \le i \le m)$ 的代价在 $a_i,b_i$ 之间建一条双向道路。若 $x$ 和 $y$ 都有机场或港口或者有道路相连,那么 $x ......
AT_abc 270 abc AT

1102 Invert a Binary Tree

题目: The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree ......
Invert Binary 1102 Tree

1086 Tree Traversals Again

题目: An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with ......
Traversals Again 1086 Tree

【做题记录】CodeForces343D Water Tree

题面翻译 - 给出一棵以 $1$ 为根节点的 $n$ 个节点的有根树。每个点有一个权值,初始为 $0$。 - $m$ 次操作。操作有 $3$ 种: 1. 将点 $u$ 和其子树上的所有节点的权值改为 $1$。 2. 将点 $u$ 到 $1$ 的路径上的所有节点的权值改为 $0$。 3. 询问点 $u ......
CodeForces Water 343D Tree 343