自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

剑似生平

自庇一身青箬笠,相随到处绿蓑衣。斜风细雨不须归

  • 博客(30)
  • 资源 (3)
  • 收藏
  • 关注

原创 快排(看了一篇博主的博客)

#include <iostream>#include <bits/stdc++.h>using namespace std;int t;void quickSort(int a[],int s,int e,int k){ if(s>=e) return; int q = a[s];//支点 int i = s+1; in...

2019-03-31 11:15:46 127

原创 MySql的安装以及Navicat for Mysql的安装和破解

我们数据库老师让我们安装Sql server或者是Mysql. 然后我昨天和Sql server英勇搏斗最后死在剑下~ 一堆bug,可是以前我电脑上是有它的,只是一年过后不知道为什么开始报错,卸了之后又安装失败,所以安装Mysql,一下子就好了。 然后我发一下链接好啦~Mysql:链接:https://pan.baidu.com/s/15b...

2019-03-27 16:00:10 215

原创 华为机试2016 (第一题和第二题和第三题)

#include <iostream>#include <bits/stdc++.h>#define maxn 30000+10using namespace std;int n,m;int A[maxn];int main(){ char c; int a,b; while(cin>>n>>m) {...

2019-03-24 16:41:49 391

原创 如何正确安装Microsoft Office 2019

昨天作死,因为Excel经常弹出一些奇奇怪怪的弹窗,我去百度搜索,没有找到答案。然后我发现大家都说最有效的办法是卸载了重新安装,于是一键就卸载完了。。。 然而,最让我担心的事情发生了!就是我再也安装不上了,之前用的是2013版的,安装2016的闪退,更糟糕的是上学期数据库老师让我们下载的visio 2013也再也安装不上了,捣鼓了大半夜,发现只要下载一个工具OTP,全程傻...

2019-03-20 17:17:21 7870 4

原创 Page Hopping UVA - 821

水题来一发.#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 105#define INF 0x3f3f3f3fusing namespace std;int d[maxn][maxn];int n;void init(){ memset(d,INF, sizeof(d)); ...

2019-03-16 14:56:28 138

原创 It's not a Bug, it's a Feature!

这道题的关键是二进制的或与运算~现在特别感激计算机基础的老师给了我们做bomb实验,受益匪浅。#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define INF 0x3f3f3f3f#define maxm 105#define maxn ((1&lt;&lt;20)+1)using namespace std;...

2019-03-16 11:09:06 1014

原创 Audiophobia UVA - 10048

这道题很像CCF的青蛙跳跳#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 101#define INF 0x3f3f3f3fusing namespace std;struct Edge{ int u,v,w; Edge(int i,int j,int k):u(i),v(j)...

2019-03-15 20:39:03 127

原创 Calling Circles UVA - 247

这道题超级妙!#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 30using namespace std;struct Edge{ int u,v; Edge(int i,int j):u(i),v(j) {} Edge() {}};int n,m;int p[m...

2019-03-15 19:51:53 152 2

原创 Buy or Build POJ - 2784

其实这道题我没有写对~我一开始写的是UVa 1151,结果是错的,然后看到有个博主说POJ上有道一毛一样的题目,迅速水过,但是到了UVa就各种WA,心里好奇,一提交POJ竟然AC。。。好吧(╯▽╰),先贴,等我找找原因为什么错再来改改。#include &lt;iostream&gt;#include &lt;algorithm&gt;#include &lt;vector&gt...

2019-03-14 19:44:49 231

原创 Slim Span UVA - 1395

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define inf 10000000#define maxn 110#define maxm 110*50using namespace std;struct Node{ int u,v,w; bool operator &lt; (const Node...

2019-03-12 09:21:05 231

原创 Common Subexpression Elimination UVA - 12219

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 50005using namespace std;string s;int k,u;//u是单词的idstruct tree{ string tmp; int lch,rch; bool operator &lt; (co...

2019-03-10 22:59:06 84

原创 Fill UVA - 10603

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 210using namespace std;int a,b,c,d;struct Node{ int v[3],dist; bool operator &lt; (const Node&amp; rhs) const {...

2019-03-10 09:52:16 107

原创 八数组

这道题也太难了!但是看着书上敲下来,其实就是一个复杂版的BFS吧,比较新的是编码的部分。#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 1000000using namespace std;typedef int State[9];State st[maxn],goal; //状态数组int...

2019-03-09 14:40:11 162

原创 Bandwidth UVA - 140

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 27#define inf 0x3f3f3f3fusing namespace std;char letter[maxn];int p[maxn];int pos[maxn];int f[maxn];int main(){ str...

2019-03-09 11:21:05 120

原创 Krypton Factor UVA - 129

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 100using namespace std;int n,L;int s[maxn];int cnt;int ans;int dfs(int cur){ if(cnt++ == n) { int j = 0;...

2019-03-09 08:51:01 130

原创 Prime Ring Problem UVA - 524

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 17using namespace std;int a[maxn];bool visited[maxn];int n;bool check(int c,int d){ int t = c+d; int flag = 0; ...

2019-03-08 20:19:51 158

原创 Fractions Again?! UVA - 10976

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;using namespace std;struct Node{ int x,y; Node(int i,int j):x(i),y(j) {} Node() {}};vector&lt;Node&gt;ans;int main(){ ...

2019-03-08 20:14:56 148

原创 八皇后 OpenJ_Bailian - 2754

会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8 * 8个方格),使它们谁也不能被吃掉!这就是著名的八皇后问题。对于某个满足要求的8皇后的摆放方法,定义一个皇后串a与之对应,即a=b1b2...b8,其中bi为相应摆法中第i行皇后所处的列数。已经知道8皇后问题一共有92组解(即92个不同的皇后串)。给出一个数b,要求输出第b个...

2019-03-08 17:16:14 136

原创 1038-纸牌游戏

题目描述:Acm队的四个大神坐在一起玩纸牌。大家都知道,每轮纸牌游戏结束之后,都需要重新洗牌,拿牌,然后整理手中的牌。而每次都单纯的如此循环很是枯燥,严重的消磨了玩纸牌的积极性。现在是一个信息爆炸的时代,科技发展迅猛,所以4个大神就希望看看能够写出一个程序,来完成这些步骤。而身为acm队的大神,手上有一定的特权,就是面对一些琐事,可以交给手下的小弟来完成,。现在,你的机会来了,洗牌...

2019-03-08 16:23:11 271

原创 Maximum Product UVA - 11059

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 20#define ll long longusing namespace std;ll num[maxn];int main(){ int n; int kase = 0; ll ans; ll temp; ...

2019-03-07 14:53:53 153

原创 Division UVA - 725

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 10using namespace std;int num[maxn];bool check(int a,int b){ memset(num,0,sizeof(num)); if(b&gt;98765) return false;...

2019-03-07 09:22:34 191

原创 Patrol Robot UVA - 1600

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 21using namespace std;struct Node{ int r,c,k; Node(int a,int b,int d):r(a),c(b),k(d) {} Node() {}};int maze[max...

2019-03-07 08:43:33 156

原创 Knight Moves UVA - 439

其实就是bfs。#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 9using namespace std;struct Node{ int r,c; Node(int i,int j):r(i),c(j){} Node(){}};int maze[maxn][maxn...

2019-03-06 17:57:04 160

原创 S-Trees UVA - 712

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 100using namespace std;int n,m;int v[maxn];string leave,q;void solve(string s){ int layer = 1; for(int i = 0;i&lt;...

2019-03-06 16:00:44 83

原创 Tree Recovery UVA - 536

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 30using namespace std;string in_order,m_order;char L[maxn],R[maxn];char build(int L1,int R1,int L2,int R2){ if(L1&gt;R1...

2019-03-06 15:47:05 147

原创 Parentheses Balance UVA - 673

hhh这道题目小生见过的!好像是逆波兰那道题目,思路其实也算是很清晰啦,因为现在宿舍熄灯了我就不详细写啦~说得好像之前认真写过一样~飞走。#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;using namespace std;bool isleft(char c){ return c == '('|| c =...

2019-03-05 23:00:32 66

原创 Ideal Path UVA - 1599

这道题的坑是在普通BFS的基础上要查看最小权值。但是我一开始想着先用最普通的bfs来写,只是在初始化时做了一个权值的排序,然而并没有什么用,因为有可能:但是一开始压进去的是b,它先找到e,所以这显然是错误的,所以应该转换一下思路,我们是因为不知道在第n层的最小权值应该是多少,才陷入困境,但是前提又是最短路,所以先从最后一个点开始bfs,其实这个思想是迪杰特斯特拉吧哈哈哈。然后我就醍...

2019-03-05 22:26:55 161

原创 Paintball UVA - 11853

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 1000+5using namespace std;int n;int vis[maxn];double W=1000.0;double x[maxn],y[maxn],r[maxn];double Left,Right;bool conne...

2019-03-05 21:17:52 130

原创 Urban Elevations UVA - 221

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 100+5using namespace std;int n;struct Node{ double x,y,w,d,h; int id; Node(double x,double y,double w,double d,...

2019-03-05 08:44:01 128

原创 Play on Words UVA - 10129

#include &lt;iostream&gt;#include &lt;bits/stdc++.h&gt;#define maxn 27using namespace std;int n;bool visited[maxn];int G[maxn][maxn];int in[maxn],out[maxn];void dfs(int u){ visited[u] =...

2019-03-04 08:49:39 112

最短迷宫路径求解

这个是数据结构的最短迷宫求解路径,通过广义搜索求解.

2018-04-13

逆波兰的程序

数据结构的作业,逆波兰的程序,写了挺久的,希望大家喜欢.

2018-03-25

学生管理系统数据库

学生管理系统数据库,自己做的~.....................................................................................................................

2018-03-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除