容斥定理!
摘要:
练习题目:HDU 4135;http://acm.hdu.edu.cn/showproblem.php?pid=4135程序:#include#include#include#includeusingnamespacestd;vectorvt;//第一次用栈!很好用longlongn,a,b,ret;longlongque[10000];voidfx(){vt.clear();ret=n;for(inti=2;i*i1)vt.push_back(ret);}longlongAns(longlongn,longlongx)//核心:其实我以为要用麻烦的DFS,队列解决!而且很好弄{intnum= 阅读全文
posted @ 2013-11-29 22:30 forgot93 阅读(153) 评论(0) 推荐(0) 编辑