
STL
indiewar
擅长各种乱搞
展开
-
hdu2094 产生冠军 (map)
产生冠军Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21123 Accepted Submission(s): 9549Problem Description有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的...原创 2018-07-16 15:49:27 · 192 阅读 · 0 评论 -
c++11 std::iota(STL)
Possible implementationtemplate<class ForwardIterator, class T>void iota(ForwardIterator first, ForwardIterator last, T value){ while(first != last) { *first++ = value; +...原创 2018-07-15 16:04:42 · 982 阅读 · 0 评论 -
N种方法遍历vector(转)
假设有这样的一个vector:(注意,这种列表初始化的方法是c++11中新增语法)vector valList = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; 需要输出这个vector中的每个元素,测试原型如下:void ShowVec(const vector<int>& valList){}int main(int argc, c...转载 2018-07-31 09:38:32 · 1106 阅读 · 0 评论