03 2024 档案
摘要:Count Valid Paths in a Tree There is an undirected tree with n nodes labeled from 1 to n. You are given the integer n and a 2D integer array edges of
阅读全文
摘要:F - Earn to Advance Problem Statement There is a grid with $N$ rows and $N$ columns. Let $(i,j)$ denote the square at the $i$-th row from the top and
阅读全文
摘要:三点不共线 题目描述 平面上有两个不同的点 $A$ 和 $B$,你需要找到另一个点 $C$ ,使得这三个点构成的 $\angle ACB$ 恰好为 $\alpha$。 需要注意的是,在下图中,$\angle 1$ 和 $\angle 2$ 都可以被认为是 $\angle ACB$ ,你只需让其中一个
阅读全文
摘要:D. Exam in MAC The Master's Assistance Center has announced an entrance exam, which consists of the following. The candidate is given a set $s$ of siz
阅读全文
摘要:C. Messenger in MAC In the new messenger for the students of the Master's Assistance Center, Keftemerum, an update is planned, in which developers wan
阅读全文
摘要:圆 题目描述 给出一个圆,圆上等距分布 $n$ 个点,编号为 $1\sim n$。 另有 $m$ 条线段,第 $i$ 条线段的端点为 $x_i$ 和 ,权重为 $w_i$。 定义一个圆是优良的,当且仅当所有线段无交(端点重合也算相交)。 如上图,线段 $\{1\rightarrow 4\}$ 与线段
阅读全文
摘要:G - Compress Strings Problem Statement You are given $N$ strings $S_1, S_2, \ldots, S_N$. Find the minimum length of a string that contains all these
阅读全文
摘要:D. Pinball There is a one-dimensional grid of length $n$. The $i$-th cell of the grid contains a character $s_i$, which is either '<' or '>'. When a p
阅读全文