![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STL
Code--Dream
acm
展开
-
优先队列
#include #include #include #include using namespace std; struct node { int a,b; friend bool operator <(node x,node y) { return x.a>y.a; //如果为 >优先级小的先出队列 反之 } }; priority_q原创 2016-03-29 12:13:06 · 332 阅读 · 0 评论 -
全排列 STL
#include #include #include using namespace std; int main() { int T,i,n; int a[9]= {1,2,3,4,5,6,7,8,9}; cin>>T; while(T--) { cin>>n; while(1) {原创 2016-04-16 18:36:53 · 379 阅读 · 0 评论 -
set STL 简单说说
set 这个容器,可以排序,以及去掉重复的东西 #include using namespace std; int main() { string s; set ss; while(cin>>s) { ss.insert(s); s.clear(); } set::iterator it; for(it=原创 2016-05-13 19:17:54 · 368 阅读 · 0 评论 -
矩阵快速幂 ——(递推表达式)
矩阵快速幂 首先知道矩阵 矩阵(Matrix)是一个按照长方阵列排列的复数或实数集合; 矩阵乘法: 定义:设A为 的矩阵,B为 的矩阵,那么称 的矩阵C为矩阵A与B的乘积,记作 ,其中矩阵C中的第 行第 列元素可以表示为: 知道矩阵乘法之后,比如菲波那原创 2016-05-06 19:44:01 · 2445 阅读 · 0 评论