摘要: 题目:DescriptionThere are only one case in each input file, the first line is a integerN (N ≤ 1,000,00)denoted the total operations executed by Mary.The... 阅读全文
posted @ 2014-07-22 22:24 海拉鲁的林克 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 如果元素被保存在vector中,可先对vector里面的元素排序,然后调用unique函数去重,unique(起始迭代器,终止迭代器),返回的是去重以后vector中没有重复元素的下一个位置的迭代器。unique的实现原理大概是判断当前元素是否等于上一个元素,如果等于就将后一个元素向前覆盖掉当前... 阅读全文
posted @ 2014-07-22 17:42 海拉鲁的林克 阅读(2646) 评论(0) 推荐(0) 编辑