只是一个引导
A Flower_Rainbow_and_Magic 知识点:构造、平均数性质、坐标 令输入点为 $P=(x,y,z)$。直接取 $$A=(x-1,y-1,z-1),\qquad B=(x+1,y+1,z+1).$$ 两点显然不同,且它们每一维坐标的平均值都恰为对应的 $P$ 坐标,因此中点就是 $P$。 时间复杂度 $\mathcal{O}(1)…
牛客周赛 Round 156 题解
牛客周赛 Round 155 题解
牛客周赛 Round 154 题解
AtCoder Beginner Contest 468 题解
牛客周赛 Round 153 题解
牛客周赛 Round 152 题解
A 运动会 知识点:字符串、计数 题面保证支柱总是成组出现并组成合法栏架,而一个栏架恰好需要两个支柱 $\texttt{|}$,所以只需要统计字符串中 $\texttt{|}$ 的数量,答案就是其一半。 时间复杂度 $\mathcal{O}(n)$。 void solve() { int n; string s; cin >> n &g…
小白月赛 Round 135 题解
牛客周赛 Round 150 题解