![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
迭代
yp_2013
这个作者很懒,什么都没留下…
展开
-
hdu 5297 Y sequence
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=5297题意:定义数列A为不能被表示成pow(a,b)(a>0,2<=b<=r)的正整数的升序排列。求A(n)。(0<n<2*1e18,2<=r<=62。容斥加迭代,因为迭代每次越来越小,而且每次加的都是差值,所以最后加到剩余的数都不是应该被去掉的就ok了,也就是说最后可以保证正好是第n个!这里的容斥有点原创 2016-02-12 21:50:34 · 287 阅读 · 0 评论 -
leetcode 385 Mini Parser
C++ Clean and Elegant Code with Clear logicclass Solution { NestedInteger parse(const string &s, int & pos) { if (s[pos] == '[') return parseList(s, pos); return par原创 2017-03-25 21:24:21 · 295 阅读 · 0 评论