码迷,mamicode.com
首页 >  
搜索关键字:push_back    ( 578个结果
P5163 WD与地图
###链接 贴一下青君大佬的博客~ #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back #define pi pair<int,int> #define mk make_pair us ...
分类:其他好文   时间:2020-11-27 11:15:36    阅读次数:6
P3366 【模板】最小生成树(Prim)
https://www.luogu.com.cn/problem/P3366 1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 #define pb push_back 4 using namespace s ...
分类:其他好文   时间:2020-11-26 15:24:23    阅读次数:48
P3899 [湖南集训]谈笑风生
###P3899 [湖南集训]谈笑风生 二维数点问题,主席树模板(两种写法 #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back using namespace std; const i ...
分类:其他好文   时间:2020-11-21 12:15:18    阅读次数:7
汇编语言-18使用BIOS进行键盘输入和磁盘读写
大多数有用的程序都需要处理用户的输入,键盘输入是最基本的输入。程序和数据通常需要长期存储,磁盘是最常用的存储设备。BIOS为这两种外设的I/O提供了最基本的中断例程。 int 9中断例程对键盘输入的处理 键盘输入将引发9号中断, BIOS提供了int 9中断例程。CPU在9号中断发生后,执行int ...
分类:移动开发   时间:2020-10-22 23:17:13    阅读次数:45
HDU3949XOR(在线询问给定集合能组成的异或和第k小的值)
题:http://acm.hdu.edu.cn/showproblem.php?pid=3949 分析:对查询的k进行二进制分解位上线性基的异或和 #include<bits/stdc++.h> using namespace std; #define pb push_back typedef lo ...
分类:其他好文   时间:2020-10-12 20:30:09    阅读次数:29
14.10进制整数转换为2进制向量
vector<int>int2Vecbinary(intiNumber,intiBits){vector<int>bTemp;for(intj=(iBits-1);j>=0;j--){bTemp.push_back((iNumber>>j)&1);}returnbTemp;}
分类:其他好文   时间:2020-09-18 00:25:03    阅读次数:23
STL之map,vector,set
Vector 基本写法 vector<int>a //定义一个int类型的vector a vector<int>a(100,0) //声明一个已经存放了100个0的整数vector 常用操作 a.size() //返回元素个数 a.pop_back() //删除末尾的元素 a.push_back( ...
分类:其他好文   时间:2020-09-17 23:20:42    阅读次数:30
7.10进制整数转换为2进制字符串
stringint2binarystring(intiNumber,intiBits){vector<int>bTemp;for(intj=(iBits-1);j>=0;j--){bTemp.push_back((iNumber>>j)&1);}stringsBinary;for(intk=0;k<bTemp.size();k++){if(0==bTem
分类:其他好文   时间:2020-09-17 19:14:16    阅读次数:22
vector emplace_back() 和 push_back() 的区别
push_back: 函数原型为: void push_back(const value_type& val); void push_back(value_type& val); 作用:在vector当前最后一个元素之后添加一个新元素,会调用拷贝函数或者移动构造函数。 // vector::push ...
分类:其他好文   时间:2020-09-17 18:10:49    阅读次数:31
Codeforces Round #666 (Div. 2)
A #include <bits/stdc++.h> #define all(n) (n).begin(), (n).end() #define se second #define fi first #define pb push_back #define mp make_pair #define ...
分类:其他好文   时间:2020-09-11 16:00:21    阅读次数:50
578条   上一页 1 2 3 4 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!