随笔分类 -  搜索-DFS

摘要:题面:https://i.cnblogs.com/EditPosts.aspx?opt=1 cpp 前置知识:g(x)=(a1+1)(a2+1)...(an+1),注意:这里p1^a1 p2^a2 ... pn^an=x,且p1,p2,...,pn均为质数 本题直接枚举每个质因子的指数个数即可,然后 阅读全文
posted @ 2019-09-11 00:15 prestige 阅读(148) 评论(0) 推荐(0)
摘要:题面:https://www.luogu.org/problem/P1016 cpp 本题直接贪心之后dfs即可,注意dfs要讨论两种情况. Code: include include include include include include include using namespace s 阅读全文
posted @ 2019-09-08 12:54 prestige 阅读(168) 评论(0) 推荐(0)