当前位置: 首页 > news >正文

个人网站怎么推广怎么增加网站外链

个人网站怎么推广,怎么增加网站外链,广州做手机网站信息,怎么介绍自己的名字注意事项 四种相关算法#xff1a;并集、交集、差集、对称差集本章的四个算法要求元素不可以重复并且经过了排序底层接受STL的set/multiset容器作为输入空间不接受底层为hash_set和hash_multiset两种容器 并集 set_union s1 U s2考虑到s1 和 s2中每个元素都不唯一#xff0…注意事项 四种相关算法并集、交集、差集、对称差集本章的四个算法要求元素不可以重复并且经过了排序底层接受STL的set/multiset容器作为输入空间不接受底层为hash_set和hash_multiset两种容器 并集 set_union s1 U s2考虑到s1 和 s2中每个元素都不唯一如果单个元素在S1中出现了m次在s2中出现了n次那么该数值在并集区间内出现的次数是 max(n,m)假设m小于n。那么m个数来自s1m-n个数来自s2稳定算法 相对次序不会改变版本一使用 operator  版本二使用 comp 进行比较注意set已经排好顺序 template class InputIterator1,class InputIterator2,class OutputIterator OutputIterator set_union(InputIterator1 first1,InputIterator1 last1,InputIterator2 first2,InputIterator2 last2,OutputIterator result){//如果均没有到达末尾//在两个区间内分别移动迭代器首先将元素较小的数值(假设为A区)记录于目标区移动A区迭代器使其前进同一时间B区迭代器保持不变//如果两个迭代器指向的元素的大小是一致的均移动两个迭代器while(true){//只要两个区间中有一个到达末尾就需要结束循环//将尚未到达尾端的区间的所有剩余元素拷贝到目的端//此刻的[first1,last1)和[first2last2)之中有一个是空白的区间if (first1last1)return std::copy(first2,last2,result);if (first2last2)return std::copy(first1,last1,result);if (*first1 *first2){*result *first1;first1;} else if(*first1 *first2){*result *first2;first2;} else{ //*first1 *first2*result *first1;first1;first2;}result;}} int main(){int first[] {5,10,15,20,25};int second[] {50,40,30,20,10};std::vectorintv(10);std::vectorint::iterator it;std::sort(first,first5); //5,10,15,20,25std::sort(second,second5); //10,20,30,40,50it std::set_union(first,first5,second,second5,v.begin()); // 5 10 15 20 25 30 40 50 0 0v.resize(it-v.begin()); // 5 10 15 20 25 30 40 50std::cout The union has (v.size()) elements:\n;for (auto tmp : v) {std::cout tmp ;}std::cout std::endl; }///Users/chy/Desktop/exceptional/cmake-build-debug/exceptional //The union has 8 elements: //5 10 15 20 25 30 40 50 // //Process finished with exit code 0 交集 set_intersection 构造元素的交集即同时出现在两个集合中的元素返回迭代器指向输出区间的尾端 考虑到s1 和 s2中每个元素都不唯一如果单个元素在S1中出现了m次在s2中出现了n次那么该数值在交集区间内出现的次数是 min(n,m)稳定算法 相对次序不会改变版本一使用 operator  版本二使用 comp 进行比较注意set已经排好顺序 template class InputIterator1,class InputIterator2,class OutputIterator OutputIterator set_intersection(InputIterator1 first1,InputIterator1 last1,InputIterator2 first2,InputIterator2 last2,OutputIterator result){while(first1!last1 first2!last2){if (*first1 *first2)first1;else if (*first1 *first2){first2;} else{*result *first1;first1;first2;result;}}return result; } int main(){int first[] {5,10,15,20,25};int second[] {50,40,30,20,10};std::vectorintv(10);std::vectorint::iterator it;std::sort(first,first5); //5,10,15,20,25std::sort(second,second5); //10,20,30,40,50it std::set_intersection(first,first5,second,second5,v.begin()); // 10 20 0 0 0 0 0 0 0 0v.resize(it-v.begin()); // 10 20std::cout The intersection has (v.size()) elements:\n;for (auto tmp : v) {std::cout tmp ;}std::cout std::endl; }///Users/chy/Desktop/exceptional/cmake-build-debug/exceptional //The union has 2 elements: //10 20 // //Process finished with exit code 0 差集 set_difference 构造集合S1 - S2。此集合包含出现于S1但是不出现于S2的每一个元素返回迭代器指向输出区间的尾端 考虑到s1 和 s2中每个元素都不唯一如果单个元素在S1中出现了m次在s2中出现了n次那么该数值在交集区间内出现的次数是 max(m-n0)稳定算法 相对次序不会改变版本一使用 operator  版本二使用 comp 进行比较注意set已经排好顺序 template class InputIterator1,class InputIterator2,class OutputIterator OutputIterator set_difference(InputIterator1 first1,InputIterator1 last1,InputIterator2 first2,InputIterator2 last2,OutputIterator result){while(first1!last1 first2!last2){if (*first1 *first2){*result *first1;result;first1;}else if (*first1 *first2){first2;} else{first1;first2;}}return std::copy(first1,last1,result); }int main(){int first[] {5,10,15,20,25};int second[] {50,40,30,20,10};std::vectorintv(10);std::vectorint::iterator it;std::sort(first,first5); //5,10,15,20,25std::sort(second,second5); //10,20,30,40,50it std::set_difference(first,first5,second,second5,v.begin()); // 5 15 25 0 0 0 0 0 0 0v.resize(it-v.begin()); // 5 15 25std::cout The difference has (v.size()) elements:\n;for (auto tmp : v) {std::cout tmp ;}std::cout std::endl; }///Users/chy/Desktop/exceptional/cmake-build-debug/exceptional //The union has 2 elements: //5 15 25 // //Process finished with exit code 0 对称差集 set_symmetric_difference 构造出 (s1 - s2) U (s2 - s1)打印出现于s1但是不出现于s2 以及出现于s2但是不出现于s1的每一个元素考虑到s1 和 s2中每个元素都不唯一如果单个元素在S1中出现了m次在s2中出现了n次那么该数值在交集区间内出现的次数是 | n - m|稳定算法 相对次序不会改变版本一使用 operator  版本二使用 comp 进行比较注意set已经排好顺序 template class InputIterator1,class InputIterator2,class OutputIterator OutputIterator set_symmetric_difference(InputIterator1 first1,InputIterator1 last1,InputIterator2 first2,InputIterator2 last2,OutputIterator result){while (true){//以下两个条件不会同时成立 即if (first1 last1){return std::copy(first2,last2,result);}if (first2 last2){return std::copy(first1,last1,result);}if (*first1 *first2){*result *first1;result;first1;}else if (*first1 *first2){*result *first2;result;first2;} else{first1;first2;}} }int main(){int first[] {5,10,15,20,25};int second[] {50,40,30,20,10};std::vectorintv(10);std::vectorint::iterator it;std::sort(first,first5); //5,10,15,20,25std::sort(second,second5); //10,20,30,40,50it std::set_symmetric_difference(first,first5,second,second5,v.begin()); //5 15 25 30 40 50 0 0 0 0v.resize(it-v.begin()); // 5 15 25 30 40 50std::cout The set_symmetric_difference has (v.size()) elements:\n;for (auto tmp : v) {std::cout tmp ;}std::cout std::endl; }///Users/chy/Desktop/exceptional/cmake-build-debug/exceptional //The union has 2 elements: //5 15 25 30 40 50 // //Process finished with exit code 0
http://www.yutouwan.com/news/319483/

相关文章:

  • 网站会员整合软件商店下载电脑版
  • 企业手机网站开通企业网站的建设内容
  • 中国住房和城乡建设部网站公文十八未成年禁用免费app
  • 网站建设的空间选择深圳展厅设计
  • 网站怎么做平台池州市建设厅官方网站
  • dede发布网站网站怎样自动文字排版
  • 青海做网站哪家好游艇网站建设方案
  • 交互做的不好的网站做平台app需要什么
  • vue做网站cmswordpress插件 2017
  • 瀑布流网站源码下载外贸网站开发营销
  • 网站主页面设计哪个好wordpress安装字体
  • 上海有名的做网站的公司今天的北京新闻
  • 涟水住房和城乡建设局网站wordpress+编辑器字号
  • 北京网站优化外包头条小程序
  • 建设网站需要支付什么插件费用吗做内容的网站
  • 成都网站制作方案手机网站备案
  • 临平做网站门户网站建站系统
  • wordpress网站上传到服务器seo排名推广
  • 做网站的时候公共部分怎么分离住建综合管理平台
  • 网页游戏网站2345展览公司
  • 做网站的缺点二级网站建设管理制度
  • 网站怎么做值班表启蒙自助建站
  • 乐峰网网站是谁做的企业网站模板 免费下载
  • 个人视频网站应该怎么做wordpress中文字体库
  • 吉林公司网站建设企业电子商务网站建设的必要性
  • 蚌埠北京网站建设wordpress英文自动采集
  • 网站建设教程 金旭亮网站建设项目招标文件
  • 支付通道网站怎么做傻瓜使用模板建网站
  • 吗网站建设新开传奇网站999新服网
  • 企业网站的作用有哪些网上投资项目的平台有哪些