04 2017 档案

摘要:将输入的大数除以9 无法整除再除以 8,7,6,..2,如果可以整除就将除数记录,将商作为除数继续除9,8,...,3,2. 最后如果商为1 证明可以除尽 将被除过的数从小到大输出即可 阅读全文
posted @ 2017-04-29 19:21 Neord 阅读(316) 评论(0) 推荐(0)
摘要:优先队列定义 priority_queue<int, vector<int>, greater<int> >pq; 优先队列重载<运算符 在结构体中定义一个 friend bool operator<(node n1,node n2){ return n1.elem>n2.elem; } 这是根据n 阅读全文
posted @ 2017-04-29 15:35 Neord 阅读(296) 评论(0) 推荐(0)
摘要:Smallest Difference Description Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and 阅读全文
posted @ 2017-04-25 18:20 Neord 阅读(1010) 评论(0) 推荐(0)