atcoder 162c game tree

AtCoder Regular Contest 139 E Wazir

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc139_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc139/tasks/arc139_e "AtCoder 传送门") 好题。 这种题一般 ......
AtCoder Regular Contest Wazir 139

AtCoder做题记录

## AtCoder做题记录 #### [[ARC082F] Sandglass](https://www.luogu.com.cn/problem/AT_arc082_d) 题意:有一个沙漏,每秒会有1g沙子从上面落下来,有$k$个时刻$r_1,r_2\cdots r_k$,每到$r_i$沙漏就会 ......
AtCoder

【atcoder begin 302】【e题 Isolation 】JAVA的快速输入输出

import java.io.*; import java.util.HashSet; import java.util.Set; /** * @author fishcanfly */ public class Main { public static void main(String[] arg ......
Isolation atcoder begin JAVA 302

AtCoder Beginner Contest 300(E,F)

# AtCoder Beginner Contest 300(E,F) ## E (概率dp) [E](https://atcoder.jp/contests/abc300/tasks/abc300_e) 这个题意大致就是一开始有一个初始数$x$为$1$,然后我们有一个骰子,最后得到的点数概率一样, ......
Beginner AtCoder Contest 300

[ABC294G] Distance Queries on a Tree 题解

## Description 有一个节点数为 $N$ 的树。边 $i$ 连接 $u_i$ 和 $v_i$,边的权值为 $w_i$。 $Q$ 次询问,询问一共有两种。 ```1 i w``` :改变第 $i$ 条边的权值为 $w$。 ```2 u v``` :输出 $u$ 到 $v$ 的路径距离。 数 ......
题解 Distance Queries 294G Tree

[学习笔记] dsu on tree

- 适用于动态维护子树信息 - 流程 类似树链剖分定义重儿子,轻重链。 先便历轻边子树,不保存信息(删)。 最后便历重儿子子树,保存重儿子信息。 再加入轻儿子子树即可得到子树信息了。 复杂度:一个点被加/删的次数为轻边数( $logn$ )。 - code 点击查看代码 ``` void solve ......
笔记 tree dsu on

AtCoder Beginner Contest 302

# A - Attack ```cpp #include using namespace std; #define int long long int32_t main() { int a , b; cin >> a >> b; cout using namespace std; #define i ......
Beginner AtCoder Contest 302

AtCoder Regular Contest 146 D >=<

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc146_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc146/tasks/arc146_d "AtCoder 传送门") 考虑直接增量构造。 ......
AtCoder Regular Contest 146 gt

JS 树形数据 Tree的通用方法

点击查看代码 ``` /** * @description 查找包含自身节点的父代节点 * @param list 列表数据 * @param id 节点 id * @param pid 节点的父id */ export function listToTree(list, id, pid) { li ......
树形 方法 数据 Tree JS

AtCoder Beginner Contest 193 F Zebraness

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc193_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc193/tasks/abc193_f "AtCoder 传送门") 复习一下最小割。 ......
Zebraness Beginner AtCoder Contest 193

AtCoder Regular Contest 146 C Even XOR

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc146_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc146/tasks/arc146_c "AtCoder 传送门") 好可爱的题啊。 没 ......
AtCoder Regular Contest Even 146

1066 Root of AVL Tree

题目: An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at ......
1066 Root Tree AVL of

AtCoder Beginner Contest 302 H. Ball Collector 题解

[AtCoder Beginner Contest 302 H. Ball Collector](https://atcoder.jp/contests/abc302/tasks/abc302_h) 题意跳过。 可以视作将 $a_i, b_i$ 之间连了一条边,然后 $a_i, b_i$ 之间只能选 ......
题解 Collector Beginner AtCoder Contest

CF1819C The Fox and the Complete Tree Traversal

# [$\color{purple}\text{The Fox and the Complete Tree Traversal}$](https://www.luogu.com.cn/problem/CF1819C) 比较有意思的一题。先考虑一个序列的权值。对长度为 $len$ 的序列排序,价值为 ......
Traversal Complete 1819C 1819 Tree

AtCoder Beginner Contest 267 Ex Odd Sum

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc267_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc267/tasks/abc267_h "AtCoder 传送门") 直接暴力跑背包的复 ......
Beginner AtCoder Contest 267 Odd

AtCoder Beginner Contest 302(E,F,G)

# AtCoder Beginner Contest 302(E,F,G) ## E(图,set) [E](https://atcoder.jp/contests/abc302/tasks/abc302_e) 这个题意大致为一开始给出$n$个点,没有一条边,后面陆续会有$q$次操作,以下两种方式 $ ......
Beginner AtCoder Contest 302

AtCoder Regular Contest 139 D Priority Queue 2

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc139_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc139/tasks/arc139_d "AtCoder 传送门") 看成方案数想了 1 ......
Priority AtCoder Regular Contest Queue

AtCoder Regular Contest 132 E Paw

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc132_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc132/tasks/arc132_e "AtCoder 传送门") 感觉挺 educa ......
AtCoder Regular Contest 132 Paw

Game on Paper 题解

[题目传送门](https://www.luogu.com.cn/problem/CF203B) 一道模拟题。 如果每涂一个格子就判断整个矩阵,那时间复杂度显然会炸。 我们每涂一个格子,影响的应该只是以这个格子为中心的 $3 \times 3$ 矩阵,判断以这些点为中心的话会不会涂出 $3 \tim ......
题解 Paper Game on

AtCoder Regular Contest 132 F Takahashi The Strongest

[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc132_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc132/tasks/arc132_f "AtCoder 传送门") 没见过这种在新运算 ......
Takahashi Strongest AtCoder Regular Contest

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

Tree-of-Thought

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

Games101——三角形随机均匀采样

assignment7中,使用了如上公式在三角形中采样,看着一头雾水,经过搜集资料,最终发现这是一个严谨的三角形随机均匀采样算法 选自 https://math.stackexchange.com/questions/18686/uniform-random-point-in-triangle-in ......
三角形 Games 101

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 ......

AtCoder Beginner Contest 296

# [AtCoder Beginner Contest 296](https://atcoder.jp/contests/abc296/tasks) ## D ### 题意 给出n和m,问$1\leq i,j\leq n$,使得$ij\geq m$,求出这个乘积的最小值 ### 思路 这两个乘数至少 ......
Beginner AtCoder Contest 296

AtCoder Regular Contest 139 C One Three Nine

[洛谷传送门](http://https://www.luogu.com.cn/problem/AT_arc139_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc139/tasks/arc139_c "AtCoder 传送门") ~~ ......
AtCoder Regular Contest Three Nine

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

Atcoder 选做

## [[ARC103F] Distance Sums](https://www.luogu.com.cn/problem/AT_arc103_d) (构造,重心) 首先显然 $D_i$ 的最小值被重心取到,不妨以重心为根。 对于一条边连接的两个点 $x,y$ ,不妨设这条边 $x$ 侧的点数为 $ ......
Atcoder

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

Atcoder Grand Contest 060 D - Same Descent Set

先推式子。设 $f(S)$ 表示 decent 集合恰好为 $S$ 的排列个数,$g(S)$ 表示 $S$ 是 $p$ 的 decent 集合的一个子集的排列 $p$ 个数,$g'(\{a_1,a_2,\cdots,a_k\})=\dfrac{n!}{a_1!(a_2-a_1)!(a_3-a_2)! ......
Atcoder Contest Descent Grand Same