
STL
oinei
欢迎加入菜鸡交流群:697208008
博主QQ:1119116025
展开
-
输出全排列 (next_permutation)
题意:输出1到=n的全排列。 输入样例: 3 输出样例: 123 132 213 231 312 321next_permutation(a,a+n); 按照字典序排序#include <cstdio>#include <cstring>#include <string>#include <algorithm>#include <queue>#include <map>原创 2017-03-13 23:02:29 · 367 阅读 · 0 评论 -
hdu 1263 水果(map)
#include <cstdio>#include <cstring>#include <string>#include <algorithm>#include <queue>#include <map>#include <cmath>#include <iostream>#define INF 0x3f3f3f3fusing namespace std;map<string,i原创 2017-03-08 22:56:55 · 299 阅读 · 0 评论 -
Attack of Panda Virus
A computer is only connected with the computers next to it. At the beginning, T computers were infected with the Panda Virus, each with a different variation (Type 1, Type 2… Type T). Each computer in原创 2017-03-28 18:29:23 · 192 阅读 · 0 评论 -
列车调度 (lower_bound)
寻找大于等于一个数的位置#include <cstdio>#include <cstring>#include <string>#include <algorithm>#include <queue>#include <map>#include <cmath>#include <iostream>#include <set>#include <vector>#define INF原创 2017-03-13 18:50:09 · 449 阅读 · 0 评论 -
STL的应用
栈和队列都没有迭代器 vector,map,set有迭代器(iterator)1.set set&lt; int &gt; q; //集合 q.insert(x); //将x推入集合,内部已自动排序且无重复项,无需sort与unique q.begin(); //集合的首地址 q.end(); //集合的尾地址 q.size();//集合的大小set&lt; int &gt; ...原创 2017-03-04 11:31:14 · 502 阅读 · 0 评论 -
ZOJ 3603 Draw Something Cheat
Have you played Draw Something? It’s currently one of the hottest social drawing games on Apple iOS and Android Devices! In this game, you and your friend play in turn. You need to pick a word and draw原创 2018-04-25 19:55:46 · 162 阅读 · 0 评论 -
hdu 6299 Balanced Sequence
Chiaki has n strings s1,s2,…,sn consisting of ‘(’ and ‘)’. A string of this type is said to be balanced:if it is the empty stringif A and B are balanced, AB is balanced,if A is balanced, (A) is b...原创 2018-07-24 14:44:20 · 217 阅读 · 0 评论