自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 收藏
  • 关注

原创 docker+jekins+maven+ssh 持续集成交付部署 jar包

2.4 新建任务->选择构建一个自由风格的软件项目,在源码管理处配置外部gitee的仓库地址,用户名和密码,选择maven版本,并指定要传输的jar、Dockerfile等文件地址,配置ssh server和构建完之后要执行的脚本。2.3 点击系统管理菜单,给jekins安装以下插件、maven-integration-plugin、publish_over_ssh、gitee;2.1 拉取镜像,挂载工作目录,xxxx为宿主机指定工作目录。2.5 最后点击立即构建即可实现ci/cd。

2024-01-29 23:35:00 806

原创 centos7.9 缺失中文字体解决办法

/usr/share/fonts/chinese

2024-01-28 00:52:55 1765

原创 docker-compose离线安装

1.官网下载docker-compose文件,要用uname -r 看一下自己安装哪个版本。2.上传到/usr/local/bin目录下。

2024-01-27 15:45:51 589

原创 数组分割工具类,方便多线程任务处理。

【代码】数组分割,方便多线程任务处理。

2024-01-27 00:31:46 592

原创 驼峰命名转化

```java import java.util.Scanner; public class Main { public static String change(String s){ //结果字符串 StringBuilder sb=new StringBuilder(); //小写就直接append //遇到大写就继续往后判断一直到最后一个连续的大写为止 然后插入_小写_ //只有一个大写直接 append .

2021-04-26 15:56:21 728

原创 二叉排序树的增删查改初始化 以及关于count的操作(2017 北工 892 算法题)

#include <iostream> using namespace std; typedef struct BinarySearchTree { int data; int count; struct BinarySearchTree* left; struct BinarySearchTree* right; BinarySearchTree() { } BinarySearchTree(int x)

2020-12-06 13:29:28 203

原创 奇数偶数划分到2边(有点跟快排的partition差不多)

#include <iostream> using namespace std; int main() { int a[10]; int n; cin>>n; for(int i=0;i<n;++i) { cin>>a[i]; } for(int i=0;i<n;++i) { cout<<a[i]; } ...

2020-12-06 11:15:29 270

原创 二叉树求叶子结点数以及树的深度

#include <iostream> using namespace std; typedef struct Tnode { int data; struct Tnode* left; struct Tnode* right; Tnode(int x) { this->data=x; this->left=NULL; this->right=NULL; } Tnode()

2020-12-06 11:10:06 1094

原创 链表删除所有最大结点

```cpp ```cpp #include <iostream> using namespace std; typedef struct Node { int data; struct Node* next; Node(int x) { this->data=x; this->next=NULL; } //空的构造方法 Node(){ } }; //打印链表 void print(.

2020-12-06 10:52:29 293

原创 链表直接插入排序法

#include <stdio.h> #include <stdlib.h> //链表结构 typedef struct Lnode { int data; struct Lnode* next; }Lnode; //打印链表 void printList(Lnode* head) { Lnode* p=head->next; while(p) { printf("%d ",p->data); p=

2020-08-11 15:13:45 884 1

原创 顺序存储的二叉树求两个结点的最近的公共祖先结点

#include <iostream> #define MAXSIZE 100 using namespace std; typedef struct Tnode { int data; bool isExist; }Tnode; typedef struct SequenceTree { struct Tnode tree[MAXSIZE]; int length; }SequenceTree; int getCommonAncestor(int i,int j,

2020-07-14 20:38:56 1470

原创 输出整数出现次数

#include <iostream> using namespace std; struct node { int num; int cnt; }; int main() { int n; cin>>n; int a[10]; struct node nums[11]; int k=-1; for(int i=0; i<n; ++i) { int data; bool .

2020-06-15 18:10:10 232

原创 1154 Vertex Coloring (25 分)

#include <iostream> #include <vector> #include <set> #define maxn 10001 using namespace std; int m,n; bool visited[maxn]= {false}; int color[maxn]; vector<int>v[maxn]; int f=0...

2019-05-31 23:31:33 178

原创 爬楼梯问题

#include <iostream> #include <cstring> using namespace std; const int maxn=101; int dp[maxn]; int sum(int n) { if(n<=0) return 0 ; if(n==1) return 1; else...

2019-05-28 21:49:33 184

原创 7-36 社交网络图中结点的“重要性”计算 (30 分)

#include <iostream> #include <vector> #include <cstdio> #include <cstring> #define INF 0x3f3f3f #define maxn 10001 using namespace std; int graph[maxn][maxn]; int n,m; void in...

2019-05-23 19:48:27 648

原创 7-33 地下迷宫探索 (30 分)

#include <iostream> #include <vector> #include <algorithm> #define maxn 1001 using namespace std; vector<int>v[maxn]; vector<int>result; bool visited[maxn]= {false}; int...

2019-05-23 18:37:39 447

原创 7-18 银行业务队列简单模拟 (25 分)

#include <iostream> #include <queue> #include <vector> using namespace std; queue<int>a; queue<int>b; int main() { int n; cin>>n; for(int i=0;i<n...

2019-05-23 15:12:33 1339

原创 前缀表达式求值

#include <bits/stdc++.h> using namespace std; stack<double>st; double yunsuan(double a,double b,string c) { if(c=="+") { return a+b; } else if(c=="-") { ...

2019-05-23 14:45:45 2106

原创 7-5 表达式转换(25 分) 能跑样例但是就得了3分 真的无语

#include <iostream> #include <stack> using namespace std; stack<char>s; string str; bool isnum(int &start)//判断从下标i起是否是一个num 判断不是一个数比较简单 { if(str[start]=='+'||str[start]==...

2019-05-23 13:57:23 661

原创 7-3 六度空间 (30 分) 广搜

#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; int m,n; const int maxn=10001; vector<int>v[maxn]; int level[maxn]; int vi...

2019-05-22 17:42:24 376

原创 7-7 六度空间 (30 分) 采用floyd最短路去求解的竟然过了

#include <iostream> #include <cstdio> #define INF 0x3f3f3f3f using namespace std; const int maxn=10000; int graph[maxn][maxn]; int n,m; void init() { for(int i=1; i<=n; ++i) { ...

2019-05-22 16:27:47 262

原创 寻宝路线(记忆划搜索方法)

在一个m行n列方格矩阵中,每一个方格内摆放着价值不等的宝贝(价值可正可负),让小明感到好奇的是,从左上角到达右下角的所有可能路线中,能捡到宝贝的价值总和最大是多少?而且这种达到最大值的路线 又有多少条?【注意:只能从一个格子向下或向右走到相邻格子,并且走到的格子宝贝一定会被捡起。】 输入格式: 第一行为整数m,n(均不大于100),下一行开始会有一个m行n列的整数方阵,对应方格矩阵中的宝贝价值(...

2019-05-18 14:23:36 735

原创 L2-031 深入虎穴 (25 分)

#include<bits/stdc++.h> #include <queue> using namespace std; const int maxsize=100002; vector<int> v[maxsize]; bool is[maxsize]={false}; int level[maxsize]={0}; int main() { in...

2019-05-10 22:06:24 463

原创 快速排序 找出序列中第k个小的数

#include <stdio.h> #include <stdlib.h> #define maxsize 1000 void quicksort(int a[],int left,int right,int k) { if(left>=right) return ; int temp=a[left]; int i=left,j...

2019-05-06 11:25:33 995

原创 链表逆转很好理解 初学者拿去看(准备考研而写)

#include <stdio.h> #include <stdlib.h> struct Lnode { int data; struct Lnode* next; }; typedef struct Lnode* list; void reverse(list h)//逆转 { list p,q;//save; p=h-&g...

2019-05-06 00:18:08 183

原创 归并排序 递归思想 先递后归

#include <iostream> using namespace std; const int maxn=10000; int a[maxn]; int b[maxn];//用来保存合并后数组 然后整体 赋值给a void merge(int left,int mid,int right) { int i=left; int j=mid+1; i...

2019-04-28 23:47:38 501

原创 二叉树的非递归前中后遍历

#include <stdio.h> #include <stdlib.h> #define maxn 1000 struct Tnode { int data; struct Tnode* left; struct Tnode* right; }; typedef struct Tnode* Btree; Btree creat()//...

2019-04-28 20:03:18 91

原创 快速排序

#include <stdio.h> #include <stdlib.h> const int maxn=10000; void quicksort(int a[],int low,int high) { int i=low,j=high; if(low<high)//如果你的一段序列的low比high大或者相等只有一个元素都是说明不用排序的 { ...

2019-04-27 00:53:10 109

原创 堆排序两种写法

#include <stdio.h> // #include <stdlib.h> #define maxn 1000 int a[maxn]; void buildheap(int low,int high) { while(1)//除非满足大顶堆性质 否则不断的检查 { int i=2*low;//左 in...

2019-04-27 00:49:25 403

原创 1041 Be Unique (20 分)

#include<bits/stdc++.h> using namespace std; const int maxsize=100001; int a[maxsize]; vector<int>v; int main() { int n; memset(a,0,sizeof(a)); cin>>n; for(int i=0;...

2019-04-21 18:03:32 170

原创 1035 Password (20 分)

#include <bits/stdc++.h> using namespace std; vector< pair<string,string > >v; int main() { int n; int f=0; int cnt=0; string s1,s2; cin>>n; for(int i=...

2019-04-21 17:49:06 182

原创 1027 Colors in Mars (20 分)

#include <iostream> #include <cstdio> #include <vector> using namespace std; char radix[13]={'0','1','2','3','4','5','6','7','8','9','A','B','C'}; vector<int>v; void change(in...

2019-04-20 15:11:08 92

原创 1019 General Palindromic Number (20 分)

#include <iostream> #include<vector> using namespace std; vector<int>v; bool ishuiwen() { for(int i=0;i<v.size()/2;++i) { if(v[i]!=v[v.size()-i-1]) { ...

2019-04-18 16:40:09 113

原创 1015 Reversible Primes (20 分)

#include <iostream> #include <cmath> #include<vector> using namespace std; vector<int>v; bool isprime(int n) { if(n<=1) return false; for(int i=2;...

2019-04-18 16:23:16 165

原创 1011 World Cup Betting (20 分)

#include <iostream> #include <vector> #include <cstdio> #include <algorithm> using namespace std; int main() { float a,b,c; vector<char>v; float money=1; ...

2019-04-17 13:02:52 117

原创 1008 Elevator (20 分)

#include <iostream> #include <vector> using namespace std; int main() { vector<int>v; int n; cin>>n; for(int i=0;i<n;++i) { int num; ...

2019-04-16 19:31:37 165

原创 1005 Spell It Right (20 分)

#include<bits/stdc++.h> using namespace std; int main() { string str[11]={"zero","one","two","three","four","five","six","seven","eight","nine"}; string s; cin>>s; char ...

2019-04-15 21:54:57 94

原创 1002 A+B for Polynomials (25 分)

#include <iostream> #include <algorithm> #include <cstdio> using namespace std; struct polynomials { float coe; int exp; }; const int maxn=21; struct polynomials p1[maxn]; i...

2019-04-15 20:32:13 113

原创 1001 A+B Format (20 分)

#include <bits/stdc++.h> using namespace std; int main() { long long a,b; char str[20]; vector<char>v; cin>>a>>b; long long c=a+b; int flag=0; if(c>=0...

2019-04-15 19:32:24 116

原创 pat搜索树判断 ac代码

#include <bits/stdc++.h> using namespace std; vector<int >v; vector<int>pre1; vector<int>pre2; vector<int>post1; vector<int>post2; struct Tnode { int data; ...

2019-03-29 17:12:08 188

空空如也

空空如也

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

TA关注的人

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