ARTS第四十八周(2020年8月17日~23日)
Algorithm
编号 | 难度 | 题目 | 我的解答 | 执行用时 | 内存消耗 | 用时排名 | 内存排名 | 查看结果 |
---|---|---|---|---|---|---|---|---|
312 | 困难 | 戳气球 | 200822-1.cpp | 76 ms | 9 MB | 6.15% | 9.09% | 查看结果 |
313 | 中等 | 超级丑数 | 200822-1.cpp | 200 ms | 9.6 MB | 37.88% | 31.00% | 查看结果 |
Review
1. 依据流程构建工具
参考:Build tools around workflows, not workflows around tools
这是一篇关于日常工作效率相关的文章,作者介绍了自己日常所用的工具,这些工具都比较轻量级,没有过多的不必要特性,却能比较有效地帮助作者达成其相应目的。我们构建各类工具时,应该围绕自己的流程目的去进行,而不是舍本逐末地为了工具去构建流程。
Tip
1. 在bash中处理日期计算
参考:How to add days to date and get new date on Linux
|
|
Share
1. C++命令行解析库
参考:https://github.com/p-ranav/structopt
C++类库,提供了一个易用的命令行解析功能
|
|
2. C++ Weekly视频:constexpr map实现
参考:YouTube: C++ Weekly - Ep 233 - std::map vs constexpr map (huge perf difference!)
将查找逻辑在编译期展开成为代码,通过gcc优化,能够比std::map快11倍。