摘要: 题目: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum o 阅读全文
posted @ 2017-05-27 22:28 皇家大鹏鹏 阅读(681) 评论(0) 推荐(0) 编辑
摘要: vector可用于代替C++中的数组,一般一致认为应该多用vector,因为它的效率更高,而且具备很好的异常安全性。而且vector是STL推荐使用的默认容器,STL中向量是使用数组实现的,因此向量具有顺序表的特点,可以快速随机存取数据。向量是一种数据类型的对象的集合,每个对象根据其位置有一个整数索 阅读全文
posted @ 2017-05-27 20:31 皇家大鹏鹏 阅读(15237) 评论(2) 推荐(1) 编辑