模板-质因子分解
摘要:
版本1:求n的所有质因子,时间复杂度O(sqrt(n))。 // 例如:12=2*2*3,那么 // factor(12, 1) => {2,3} // factor(12, 0) => {2,2,3} std::vector<int> factor(int n, int removeDup) { 阅读全文
posted @ 2024-10-16 12:48 chenfy27 阅读(49) 评论(0) 推荐(0)
2024年10月16日 #
posted @ 2024-10-16 12:48 chenfy27 阅读(49) 评论(0) 推荐(0)
posted @ 2024-10-16 12:40 chenfy27 阅读(48) 评论(0) 推荐(0)
posted @ 2024-10-16 12:37 chenfy27 阅读(64) 评论(0) 推荐(0)
posted @ 2024-10-16 12:33 chenfy27 阅读(38) 评论(0) 推荐(0)