摘要:
F. A Growing Tree You are given a rooted tree with the root at vertex $1$, initially consisting of a single vertex. Each vertex has a numerical value, 阅读全文
摘要:
D. Absolute Beauty Kirill has two integer arrays $a_1,a_2,\ldots,a_n$ and $b_1,b_2,\ldots,b_n$ of length $n$. He defines the absolute beauty of the ar 阅读全文
摘要:
G. Unusual Entertainment A tree is a connected graph without cycles. A permutation is an array consisting of $n$ distinct integers from $1$ to $n$ in 阅读全文
摘要:
F - Apples Problem Statement There are apple trees lined up on a number line, and $N$ apples fall from the trees.Specifically, for each $1\leq i\leq N 阅读全文
摘要:
D. Score of a Tree You are given a tree of $n$ nodes, rooted at $1$. Every node has a value of either $0$ or $1$ at time $t=0$. At any integer time $t 阅读全文
摘要:
D. Counting Factorizations The prime factorization of a positive integer $m$ is the unique way to write it as $\displaystyle m=p_1^{e_1}\cdot p_2^{e_2 阅读全文
摘要:
[USACO22OPEN] Apple Catching G 题目描述 天上下苹果了!在某些时刻,一定数量的苹果会落到数轴上。在某些时刻,Farmer John 的一些奶牛将到达数轴并开始接苹果。 如果一个苹果在没有奶牛接住的情况下落到数轴上,它就会永远消失。如果一头奶牛和一个苹果同时到达,奶牛就会 阅读全文