- 博客(5)
- 问答 (4)
- 收藏
- 关注
原创 multiset与set
set的含义是集合,它是一个有序的容器,里面的元素都是排序好的,支持插入,删除,查找等操作,就 像一个集合一样。所有的操作的都是严格在logn时间之内完成,效率非常高。 set和multiset的区别是:set插入的元素不能相同,但是multiset可以相同。
2017-01-24 12:14:19 173
转载 强大的string :: iterator 和next_permutation
// NYOJ--STL--擅长排列的小明 #include #include #include using namespace std; string a="123456789"; int main() { int n; cin >> n; while(n--) { int n,m; cin >> n >> m; string output
2017-01-24 11:45:35 462
原创 string::npos,一个很大的数
string::npos,这是一个很大的数 npos 是这样定义的: static const size_type npos = -1; 因为 string::size_type (由字符串配置器 allocator 定义) 描述的是 size,故需为无符号整数型别。因为缺省配置器以型别 size_t 作为 size_type,于是 -1 被转换为无符号整数型别,npos 也就成了该
2017-01-24 11:31:01 228
原创 80.NYOJ--STL--一种排序
#include #include #include #include using namespace std; struct rec{ int n; int l;//long int w;//width bool operator if(n>a.n){ return 0; }else if(n return 1; }else { if(l>a.l){ ret
2017-01-24 11:28:05 159
原创 79.NYOJ--STL--求次数
#include #include #include using namespace std; int main(){ // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); map::iterator it; int T; scanf("%d",&T); while(T--){ in
2017-01-24 11:27:33 170
空空如也
Android录音实现的代码中,setAudioSource()方法出错,程序停止
2017-04-06
Android,获取不到button的id
2017-03-10
Android 怎么实现点击button之后读取文件下一行
2017-02-26
关于Python爬虫访问网站的两个问题
2016-08-27
TA创建的收藏夹 TA关注的收藏夹
TA关注的人