摘要: 递推就好了 所有2的次方均只有1个1 以每个2的次方为一段 遍历i从2到n temp为当前不大于i的最大的2的次方 ret[i] = ret[temp] + ret[i - temp] class Solution { public: vector<int> countBits(int n) { i 阅读全文
posted @ 2022-03-27 23:56 WTSRUVF 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 嗯。。。用的加法,注意a为最大值 b为1或者-1,还有a为负数最小值就行 也可以用位运算 << 相当于 * 2呗 其他的可以用sum + sum <= abs(a) 来优化 class Solution { public: int divide(int a, int b) { long long A 阅读全文
posted @ 2022-03-27 23:26 WTSRUVF 阅读(15) 评论(0) 推荐(0) 编辑
摘要: pcl库下载地址:https://github.com/PointCloudLibrary/pcl/releases 请下载以下两个文件 PCL-1.12.0-AllInOne-msvc2019-win64.exe pcl-1.12.0-rc1-pdb-msvc2019-win64.zip 直接运行 阅读全文
posted @ 2022-03-27 10:38 WTSRUVF 阅读(768) 评论(0) 推荐(0) 编辑