Codeforces 1076 - 题集
Codeforces 1076A - Minimizing the String 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/A 题意 你有一个字符串,你最多可以删掉一个字母,使得剩下的字符串的字典序最小。 思路 从左向右找到第一个当前字母小于下一个字母的位置,删...
Codeforces 1076A - Minimizing the String 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/A 题意 你有一个字符串,你最多可以删掉一个字母,使得剩下的字符串的字典序最小。 思路 从左向右找到第一个当前字母小于下一个字母的位置,删...
Codeforces 1076E - Vasya and a Tree - 树状数组 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/E 题意 给你一棵有根树,有 $m$ 次操作,每次操作为 v d x,代表着把以 $v$ 为根深度不超过 $d$ 的所有点的权值都加上 $x$...
Codeforces 1076D - Edge Deletion - 思维 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/D 题意 有一个 $n$ 个点 $m$ 条边的无向图 $G<n, m>$,定义 $dist(i)$ 为从 $1$ 号点出发到 $i$ 号点的...
Codeforces 1076C - Meme Problem 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/C 题意 给你一个非负整数 $d$ ,你要找到两个非负的自然数 $a$、$b$,使得 $a + b = d$ 和 $a \cdot b = d$ 同时成立,问是否存...
Codeforces 1076B - Divisor Subtraction 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/B 题意 你有一个程序 $f(n)$: 如果 $n = 0$ 结束程序 找到 $n$ 的最小质因数 $d$ $n = n - d$ ,...
Codeforces 1076A - Minimizing the String 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1076/problem/A 题意 你有一个字符串,你最多可以删掉一个字母,使得剩下的字符串的字典序最小。 思路 从左向右找到第一个当前字母小于下一个字母的位置,删...
boost 中 cat.hpp 学习笔记 文章地址 https://www.lucien.ink 引入 Linux 需要 install 一下 libboost-dev 这个库,macOS 没有测,Windows 日常不在考虑范围内。 BOOST_PP_CAT 宏包含于 boost/preprocessor/cat.hpp 中。 用法 BOOST_PP_CAT(a, b) 这...
boost 中 for_each.hpp 学习笔记 文章地址 https://www.lucien.ink 引入 Linux 需要 install 一下 libboost-dev 这个库,macOS 没有测,Windows 日常不在考虑范围内。 BOOST_PP_SEQ_FOR_EACH 宏包含于 boost/preprocessor/seq/for_each.hpp 中。 用法...
单个题目的链接 Codeforces 1084A - The Fair Nut and Elevator Codeforces 1084B - Kvass and the Fair Nut - 二分 Codeforces 1084C - The Fair Nut and String Codeforces 1084D - The Fair Nut and the Best Path - 树...
Codeforces 1084E - The Fair Nut and Strings - 思维 题解链接 https://lucien.ink 题目链接 https://codeforces.com/contest/1084/problem/E 题意 给你一个区间 $[s, t]$,其中 $s$ 和 $t$ 都是字符串,且长度为 $n$,只包含 ab 两种字符,问...