摘要:
闇の連鎖 传说中的暗之连锁被人们称为 Dark。 Dark 是人类内心的黑暗的产物,古今中外的勇者们都试图打倒它。 经过研究,你发现 Dark 呈现无向图的结构,图中有 $N$ 个节点和两类边,一类边被称为主要边,而另一类被称为附加边。 Dark 有 $N–1$ 条主要边,并且 Dark 的任意两个 阅读全文
摘要:
D. Super-Permutation A permutation is a sequence $n$ integers, where each integer from $1$ to $n$ appears exactly once. For example, $[1]$, $[3,5,2,1, 阅读全文
摘要:
F. Gardening Friends Two friends, Alisa and Yuki, planted a tree with $n$ vertices in their garden. A tree is an undirected graph without cycles, loop 阅读全文
摘要:
G2. Magic Triples (Hard Version) This is the hard version of the problem. The only difference is that in this version, $a_i \le 10^9$. For a given seq 阅读全文
摘要:
Minimum Number of Visited Cells in a Grid You are given a 0-indexed m x n integer matrix grid . Your initial position is at the top-left cell (0, 0). 阅读全文
摘要:
Minimum Reverse Operations You are given an integer n and an integer p in the range [0, n - 1]. Representing a 0-indexed array arr of length n where a 阅读全文