博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
merge http://www.cplusplus.com/reference/algorithm/merge/
阅读量:4318 次
发布时间:2019-06-06

本文共 624 字,大约阅读时间需要 2 分钟。

// merge algorithm example #include 
#include
#include
using namespace std; int main () {
int first[] = {
5,10,15,20,25}; int second[] = {
50,40,30,20,10}; vector
v(10); vector
::iterator it; sort (first,first+5); sort (second,second+5); merge (first,first+5,second,second+5,v.begin()); cout << "The resulting vector contains:"; for (it=v.begin(); it!=v.end(); ++it) cout << " " << *it; cout << endl; return 0; }

转载于:https://www.cnblogs.com/tangcong/archive/2011/07/29/2121534.html

你可能感兴趣的文章
Java魔法堂:找外援的利器——Runtime.exec详解
查看>>
mysql数据库存放路径
查看>>
TestNG(五)常用元素的操作
查看>>
解决 Visual Studio 点击添加引用无反应的问题
查看>>
通过镜像下载Android系统源码
查看>>
python字符串格式化 %操作符 {}操作符---总结
查看>>
windows 不能在 本地计算机 启动 Apache
查看>>
iOS开发报duplicate symbols for architecture x86_64错误的问题
查看>>
Chap-6 6.4.2 堆和栈
查看>>
【Java学习笔记之九】java二维数组及其多维数组的内存应用拓展延伸
查看>>
C# MySql 连接
查看>>
sk_buff Structure
查看>>
oracle的级联更新、删除
查看>>
多浏览器开发需要注意的问题之一
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>