上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 43 下一页
摘要: C++ Primer 5th edition, chapter 13. The Rule of Three If a class needs a destructor, it almost surely needs a copy constructor and copy assignment ope 阅读全文
posted @ 2019-09-13 23:48 Pat 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Kick Start 2019 Round E "Code Eat Switcher" 贪心、排序 阅读全文
posted @ 2019-09-11 09:31 Pat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Nmap 版本 症状: 相关信息: https://github.com/nmap/nmap/issues/550 阅读全文
posted @ 2019-09-11 00:30 Pat 阅读(2154) 评论(3) 推荐(0) 编辑
摘要: Problem binding to interface , errno: 92 socket_bindtodevice: Protocol not available Problem binding to interface , errno: 92 socket_bindtodevice: Pro 阅读全文
posted @ 2019-09-10 10:22 Pat 阅读(2530) 评论(0) 推荐(0) 编辑
摘要: 题目大意 求 $\sum_{i = 1}^{n} \sum_{j = 1}^{m} \mu(\lcm(i, j))$ 。 $ 1 \le n, m \le 10^6 $ 。 分析 不妨设 $ n \le m$ 。 $ \mu(\lcm(i, j)) = \mu(i) \mu(j) \mu(\gcd( 阅读全文
posted @ 2019-09-09 11:53 Pat 阅读(185) 评论(0) 推荐(0) 编辑
摘要: "题目链接" 分析 异或运算满足「三角不等式」。 $\forall a, b, c \in \mathbb{Z}\_{\ge 0}$,有 $a \xor b \le (a \xor c) + (c \xor b)$ 。 证明:容易证明:$\forall a, b \in \mathbb{Z}_{\g 阅读全文
posted @ 2019-08-25 17:29 Pat 阅读(139) 评论(0) 推荐(0) 编辑
摘要: X or What? 符号约定: $\xor$ 表示异或。 popcount($x$) 表示非负整数 $x$ 的二进制表示里数字 1 出现的次数。例如,$13 = 1101_2$,则 popcount(13) = 4。 注意到,popcount($a \xor b$) = popcount($a$) 阅读全文
posted @ 2019-07-28 17:38 Pat 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 腾讯 C++ 客户端研发实习生 有两个水杯,容积分别为 6 升和 5 升。试问可否 只 用这两个水杯量出 3 升水。 如果可以用第三个容器,那么这个问题就很简单了。我们可以量出 1 升水(先把 6 升的水杯灌满,再用其中的水把 5 升的水杯灌满),这样就能得到任意整数升水。面试时我就是这么回答的,现 阅读全文
posted @ 2019-06-06 16:17 Pat 阅读(668) 评论(0) 推荐(0) 编辑
摘要: "题目链接" 题目大意 给定一个长为 $n$ 的数组 $s$,下标从 $0$ 开始。$ 3 \le n \le 10^5$,$ 10^9 \le s_i \le 10^9$,$s_0 = s_{n 1} = 0$ 。 一只青蛙要在数组 $s$ 上玩一个游戏。游戏规则如下 初始时青蛙的位置(即青蛙所在 阅读全文
posted @ 2019-06-01 12:29 Pat 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 我已经在博客里面发布了好几篇 CLion 使用笔记了,没追究这是第几篇,姑且算作第三篇。 我的 CLion 是搭配了 "MSYS2" 和 "Conan" 使用的。MSYS2 提供 C++ toolchain。Conan 作为 C++ 包管理工具,用它可以方便地安装 Boost 等 C++ 库。 MS 阅读全文
posted @ 2019-05-30 03:26 Pat 阅读(2264) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 43 下一页