Loading...
Codeforces 1076C - Meme Problem题解链接https://lucien.ink题目链接http://codeforces.com/contest/1076/problem/C题意给你一个非负整数 $d$ ,你要找到两个非负的自然数 $a$、$b$,使得 $a + b = d$ 和 $a \cdot b = d$ 同时成立,问是否存在这样的一对 $a$、$b$,不存...
Codeforces 1076B - Divisor Subtraction题解链接https://lucien.ink题目链接http://codeforces.com/contest/1076/problem/B题意你有一个程序 $f(n)$:如果 $n = 0$ 结束程序找到 $n$ 的最小质因数 $d$$n = n - d$ ,然后回到步骤 $1$问这个程序会执行多少次减法。思路偶数...
Codeforces 1076A - Minimizing the String题解链接https://lucien.ink题目链接http://codeforces.com/contest/1076/problem/A题意你有一个字符串,你最多可以删掉一个字母,使得剩下的字符串的字典序最小。思路从左向右找到第一个当前字母小于下一个字母的位置,删掉这个字母即可。实现https://paste...
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)这个宏会将 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 中。用法BOOST_PP_SEQ...