摘要: 就是一步一步把大的往目标地放。 cpp include include using namespace std; int fro[55], too[55], cnt, uu, n, ans=0; void dfs(int x, int qu){ if(fro[x]==qu) return ; for 阅读全文
posted @ 2017-12-19 21:39 poorpool 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 搜索+背包就是了 cpp include include include using namespace std; int n, m, a[25], ans=0, lst=0; bool isu[25], f[2005]; void dfs(int x){ if(x==m+1){ int cnt=0 阅读全文
posted @ 2017-12-19 20:43 poorpool 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 点 $ (i,j) $ 会看不见当有 $ k|i $ 且 $ k|j$ 时。 然后就成了求欧拉函数了。 cpp include include include using namespace std; int n, phi[40005], pri[40005], cnt; bool isp[4000 阅读全文
posted @ 2017-12-19 20:08 poorpool 阅读(136) 评论(0) 推荐(0) 编辑
摘要: hdu1787,直接求欧拉函数 poj2478,欧拉函数递推,证明可以看 "这里" 或者是算法竞赛进阶指南 $n \log n$ 筛 cpp include include include using namespace std; int n; long long phi[1000005]; voi 阅读全文
posted @ 2017-12-19 19:15 poorpool 阅读(158) 评论(0) 推荐(0) 编辑