摘要: Permutation Transformer UVA - 11922 题意:1到n的排列,翻转a到b这一段并加到末尾,m次。输出最后的排列。 比着模板打的。。。orz,等有感觉了再回来写。 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 阅读全文
posted @ 2017-07-30 20:07 yijiull 阅读(187) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-07-30 19:30 yijiull 阅读(1) 评论(0) 推荐(0) 编辑
摘要: Graph and Queries UVALive - 5031 第一道Treap,对着白书敲的=_=|| 1 #include <bits/stdc++.h> 2 using namespace std; 3 //15:15--16:00 4 struct Node{ 5 Node *ch[2]; 阅读全文
posted @ 2017-07-30 16:10 yijiull 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1 const int maxn=65; 2 struct Matrix 3 { 4 int n,m[maxn][maxn]; 5 void init(int sz) 6 { 7 memst(m,0,sizeof(m)); 8 n=sz; 9 } 10 Matrix(int sz=0){init(s 阅读全文
posted @ 2017-07-30 11:17 yijiull 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 翻了下之前做过的题,感觉都水的不行=_=|| The Unique MST POJ - 1679 题意:判断最小生成树是否唯一。 先求出最小生成树权值ans,用vector记录用的边。 依次不用vector里记录的边求生成树,若权值等于ans,说明不唯一。 1 #include<iostream> 阅读全文
posted @ 2017-07-30 00:03 yijiull 阅读(166) 评论(0) 推荐(0) 编辑