随笔分类 -  C++函数的应用

vector 应用
摘要:#include <vector>vector< 类型 > 标识符 ;vector<int>G; 建立int类型vector<int> G[N];///二维数组的建立for(int i=0;i<N;i++)///清空 G[i].clear();int index = upper_bound(G.be 阅读全文
posted @ 2017-11-17 09:36 云胡不喜。 阅读(190) 评论(0) 推荐(0)
九个数的全排列(避免重复出现)
摘要:题意:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1384 使用标准库里面的next_permutation()函数,这个函数是生成所有比当前的字符串大的字符串,所以最开始经过sort()排序之后,要先打印出当前的字符串 阅读全文
posted @ 2017-11-15 16:38 云胡不喜。 阅读(492) 评论(0) 推荐(0)