自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 mysql 修改为简单密码

将mysql密码改为123456//修改限定密码长度为6set global validate_password_length=6;//修改密码安全等级为低set global validate_password_policy=0;//更改密码ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

2022-05-05 12:03:57 873

原创 idea tomcat启动控制台乱码

打开下图路径加入下面这行代码即可-Dfile.encoding=UTF-8

2021-11-08 16:02:38 172

原创 jsp运行显示源码

在web.xml配置文件中将下面这行删除

2021-11-07 17:37:32 1459 3

转载 idea配置 Tomcat Deployment添加时没有Artifact选择的解决方案

2021-11-04 15:45:17 295

原创 使用idea创建maven项目后没有.iml文件

在Terminal里输入命令:mvn idea:module

2021-11-04 15:15:58 2025

原创 Linux终端命令

查看当前登录用户: who am i切换到root用户:su查看当前所在路径:pwd查看当前目录中的内容:ls查看详细信息:ls-l帮助:ls--help切换目录:cd切换到根目录:cd /切换到当前用户的家目录:cd~切换到上一级目录:cd ..切换到上一个工作目录:cd-创建文件(空文件)不能对其进行输入:touch创建目录(同时可以创建一个或多个目录):mkdir 创建多层级目录:mkdir -p对文件的操作:复制:cp 想要复制的文件名 目的地例:cp 1.txt

2021-06-10 12:21:55 87

原创 Mysql安装与配置

一:下载网址:mysql8,后点击底部”No thanks, just start my download.”即可开始下载二:直接解压到任意文件夹,解压完是没有下面这两个文件的。在这个目录下创建一个txt文件,将 后缀改成ini即可。文件中的内容如下:tips:其中三四行为安装地址,根据实际存储位置修改即可[mysqld]port=3306basedir=E:\Application\Mysql\mysql-8.0.11-winx64datadir=E:\Application\Mys

2021-06-01 10:35:06 117

原创 树上任意两叶节点距离平方和

牛客icpc热身赛第八场B#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <vector>#include <list>#include <set>#include <utility> #include <map>#

2021-05-06 16:02:55 211

原创 HDU-4821-String (字符串哈希)

题目链接题意:给定数字L、M以及字符串S,问S有多少长度为L*M的子串满足分成M段L长度的字符串并且每段不完全相同。思路:运用的哈希的算法,将每一位的值计算成一个哈希值,再将m段的字符串哈希值存在map中与m比较,然后再去掉子串最前面的L长度的哈希值,加上子串后L长度的哈希值,以此类推。#include <bits/stdc++.h>using namespace std;#define ull unsigned long longconst int N = 1e5+10;c

2021-04-07 13:35:19 333

原创 Java环境配置

一:下载与安装JDKoracle官网下载安装时一直点击下一步即可(保存路径时最好保存一下版本号)二: 环境配置1,找到jdk中到bin的目录2,将1中的目录在系统变量中存为JAVA_HOME3,选择编辑Pass变量,新建存为 %JAVA_HOME%\bin,然后确定即可三:查看是否配置成功打开cmd输入下面三条指令查看即可...

2021-03-12 19:58:20 96

原创 IDEA配置与安装(java)

一:下载官网链接二:安装三:配置1,打开IDEA2,New Project3,Empty Project4,设置项目名称和路径5,新建模块6,自动识别JDK7,模块名称及路径8,创建包

2021-03-10 13:12:33 296

原创 Sublime配置C++

一:下载安装http://www.sublimetext.com/(官网)二:MinGW建议下载Devc++(腾讯软件中心下载即可),直接用包里面的。三:环境将Devc++中的bin目录的路径添加到系统环境的path变量中。四:Sublime进入sublime,Tools->Build System->New Build System将下面代码存为"C++.sublime-build",路径默认。{ "encoding": "utf-8", "working_dir": "

2021-03-08 16:51:47 353

原创 Codeforces Round #693 (Div. 3)

A. Cards for Friends题意:给定一个w*h的矩形和一个数n,每次可以沿w一分为二,也可以沿h一分为二,前提是长度为偶数,问最后分成的块能否大于等于n思路:将w和h一直分,分到不能分为止,最后乘起来为最后的块数,再与n比较即可int main(){ int t; cin >> t; while(t--) { int w, h, n; cin >> w >> h >> n; int c1 = 1; while(w%2

2021-01-05 13:24:50 194

原创 Educational Codeforces Round 100 (Rated for Div. 2)

tip:点击题目即可跳转A. Dungeon题意:给定三个数,每次可以使其中一个数减一,逢7的倍数的次数会使三个均减一,问是否能使三个数同时减为0思路:简单思维。相当于减9为一个回合,并且判断有没有数小于这个回合数int main(){ int t; cin >> t; while(t--) { ll a, b, c; cin >> a >> b >> c; ll sum = a+b+c; if(sum%9==0) { l

2020-12-20 12:14:10 260 1

原创 Codeforces Round #690 (Div. 3)

tip:点击题目即可跳转A. Favorite Sequence题意:给定n个数,按1,n,2,n-1…的顺序输出思路:简单题。直接按题意输出即可。int s[500];int main(){ int t; cin >> t; while(t--) { int n; cin >> n; for(int i = 1; i <= n; i++) { cin >> s[i]; } int l = 1; int r = n;

2020-12-18 11:47:34 325

原创 二叉搜索树(BST)

#include <bits/stdc++.h>using namespace std;struct BST{ int data; BST *l; BST *r;};// 新建节点BST *Create_Node(int x){ BST *p; p = (BST *)malloc(sizeof(BST)); p->data = x; p->l = NULL; p->r = NULL; return p;}// 插入元素B

2020-12-11 20:38:32 119

原创 ZOJ - 3261-Connections in Galaxy War(反向并查集)

题目链接题意:有n个恒星,每个行星有个攻击力,m个行星之间的道路,q次操作,query:询问和a行星在同一个并查集中攻击力最大的行星编号,相同输出小的,没有输出-1,destory:将a行星和b行星之间联系删除,也就是说a行星到b行星之间的路径不存在了,但是仍可通过其他行星使得其二在同一个并查集中。思路:反向并查集,先把所有的关系存下来,将m条路径除去被destory的以外建立并查集,然后从最后一个询问开始反向操作,遇到destory将道路重新加回并查集中,因为对于该条destory上面的询问来说这条路

2020-10-28 16:16:18 228

原创 单链表

#include <iostream>using namespace std;struct Node{ int Data; struct Node * Next; };Node *InitList(Node *L) // 初始化链表{ L = (Node *)malloc(sizeof(Node)); L->Next = NULL; return L;}void CreatList_Head(Node *L) // 头插法建链表{ Node *p;

2020-10-18 16:24:08 200

原创 2019山东省省赛

A - Calandar题意:给定一个日期以及日期的星期,问另一个日期的星期,每周5天,一月30天,一年12月思路;每周的天数一样,所以只要看日的差别即可#include <bits/stdc++.h>using namespace std;#define ll long longconst int N = 5e4+10;string ww[10] = {"0","Monday","Tuesday","Wednesday","Thursday","Friday"};int m

2020-10-03 11:12:56 262

原创 第十七届中国计量大学程序设计竞赛

F: Flag Scramble Competition题意:输出题目描述中出现次数最多的字母思路:读入字符串,用map统计字母个数 (代码是找字母用的)#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <vector>#include <list>#

2020-09-27 16:10:03 411

原创 ZCMU 暑期练习赛2

A:蒜头君的羽毛球双端队列的简单应用#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <vector>#include <list>#include <set>#include <utility> #include <m

2020-08-23 11:34:34 170

原创 次短路问题(陕西师范大学第九届ACM程序设计竞赛-F 新冠病毒要回家)

求到顶点v的次短路时,有两种情况,要么是到其他某个顶点u的最短路再加上u->v的边,要么是到某个顶点u的次短路再加上u->v的边。 一般我们用Dijkstra求得最短路(无负权边),由此我们只要在Dijkstra算法中求取每个顶点的次短路即可。例题:陕西师范大学第九届ACM程序设计竞赛-F 新冠病毒要回家#include <stdio.h>#include <stdarg.h>#include <stdlib.h>#include <m..

2020-08-18 21:36:23 185

原创 三角形相关(数论)

面积 double x1, x2, x3, y1, y2, y3; scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3) double a = sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); double b = sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3)); double c = sq.

2020-08-18 21:18:29 188

原创 ZCMU-1740: 关系推断

题目拓扑的小升级, 输出所有存在的大小关系,基本与拓扑相同,只是在跑入度为0的点时,加一个bfs搜索一下这个点能到达的点,也就是大小关系的判断就OK了。#include<bits/stdc++.h>using namespace std;char s[5];int in[50];int vis[50][50];vector<int>cot;vector<int>G[50];vector<pair<int,int> >ans;

2020-08-14 09:39:24 218

原创 2020 Multi-University Training Contest 6 A Very Easy Graph Problem

传送门题目:给定n个点,m条边,每个点的权值为0 or 1,求所有权值为1的点到权值为0的点的最短路的和,第i条边权值的为2^i。思路:首先,根据给定的边权值的条件可以发现:后建的边一定是大于之前建的边的权值和(等比数列求和),所以只要建成一个树即可(并查集维护),这样就处理掉了最短路的问题,建完树之后,我们不妨把节点1当作根节点,然后跑一遍dfs遍历一遍树,统计每个节点的子树的1和0的个数,最后统计每条边要被经过的次数(贡献值),这个次数计算方式,就是当前这条边的子树的0的个数乘上不在其子树上的节点

2020-08-07 10:30:21 197

原创 判负环(Bellmanford Spfa)

Bellmanford#include <iostream>#include <cmath>#include <algorithm>#include <cstdio>#include <cstring>#include <queue>#include <stack>#include <map>using namespace std;#define INF 0x3f3f3f#define .

2020-08-03 09:44:01 161

原创 ZCMU-1803: 2n皇后问题

八皇后问题的进阶版先枚举白皇后的位置,再枚举黑皇后的位置,判断黑皇后要多判断一下该位置是否已放置白皇后。#include <iostream>#include <cstdio>#include <cstring>#include <queue>using namespace std;#define INF 0x3f3f3f#define cio ios::sync_with_stdio(false)const int N = 100010.

2020-07-28 10:29:07 204

原创 八皇后问题

在8*8的棋盘中放置八个皇后棋子,要求每一行每一列每一条对角线上只出现一个皇后棋子。枚举每一行放置的情况,递归到第八行。#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>#include <set>us.

2020-07-28 09:53:35 108

原创 DIjkstra(链式前向星建图)

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>#include <set>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {r

2020-07-27 11:51:31 214

原创 [kuangbin带你飞]专题一 简单搜索-----总结

A:棋盘问题(dfs暴力枚举每一行的摆放情况,同时存储每一列的摆放情况)B:Dungeon Master(bfs三维最短路)C:Catch That Cow(bfs暴力枚举三种操作)D:Filptile(dfs状态压缩枚举第一行的情况,可以推出之后所有行的情况)E:Find The Multiple(dfs暴力跑19位数即可)F:Prime Path(bfs枚举每一位数可能变化的情况)G:Shuffle‘m Up(根据题意模拟即可)H:Pots(bfs暴力枚举6种操作)I:Fire Gam.

2020-07-26 20:59:18 173

原创 [kuangbin带你飞]专题一 简单搜索- D - Fliptile

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 20:39:42 146

原创 [kuangbin带你飞]专题一 简单搜索- G - Shuffle‘m Up

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 17:19:33 113

原创 [kuangbin带你飞]专题一 简单搜索- E - Find The Multiple

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 16:32:45 153

原创 [kuangbin带你飞]专题一 简单搜索- I - Fire Game

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 15:51:25 155

原创 [kuangbin带你飞]专题一 简单搜索- J - Fire!

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 15:05:10 146

原创 [kuangbin带你飞]专题一 简单搜索- N - Find a way

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 14:11:07 121

原创 [kuangbin带你飞]专题一 简单搜索- F - Prime Path

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 13:08:41 155

原创 [kuangbin带你飞]专题一 简单搜索- M - 非常可乐

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 11:48:34 132

原创 [kuangbin带你飞]专题一 简单搜索- H - Pots

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 11:09:42 139

原创 [kuangbin带你飞]专题一 简单搜索- L - Oil Deposits

#include <iostream>#include <cmath>#include <cstdio>#include <cstring>#include <algorithm>#include <queue>#include <map>using namespace std;#define INF 0x3f3f3fint gcd(int a, int b) {return b==0 ? a:gcd(b,

2020-07-26 09:05:10 112

空空如也

空空如也

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

TA关注的人

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