自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 后端人员常用linux命令(持续更新)

后端人员常用linux命令(持续更新)1.cd 命令 说明: 切换当前目录 参数:要切换到的目录路径 例如: cd /usr/bin # 切换到目录/usr/bin cd ./path # 切换到当前目录下的path目录中, “.”表示当前目录 cd ../path # 切换到上一级目录下的path目录中, ...

2020-04-14 23:28:21 406

转载 高级Bash脚本编程指南——一本深入学习shell脚本艺术的书籍

http://www.reddragonfly.org/abscn/index.html目录序1. 原书作者致中国读者(英文)2. 原书作者致中国读者(译文)3. 黄毅4. 杨春敏第一部分. 热身1. 为什么使用shell编程?2. 带着一个Sha-Bang出发(Sha-Bang指的是#!)2.1. 调用一个脚本2.2. 初步的练习第二部分. 基本...

2019-12-30 21:53:27 1268 1

原创 安装mysql后使用mysql workbench连接不上

可以在在cmd中可以连接mysql,但是mysql workbench连接不上;可依次做以下检测1.检测mysql服务是否运行: service mysql status 若未启动: service mysql start2.进入mysql:mysql -u root -p出现Enter passwod: 后输入...

2019-12-29 22:30:32 6406 2

原创 I - 胜利大逃亡 (BFS)

Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计算出Ig...

2018-10-15 17:14:49 369

原创 1038D. Slime(思维)

There are nslimes in a row. Each slime has an integer value (possibly negative or zero) associated with it.Any slime can eat its adjacent slime (the closest slime to its left or to its right, assu...

2018-09-11 13:14:46 545

原创 1038C. Gambling(思维+模拟)

Two players A and B have a list of nintegers each. They both want to maximize the subtraction between their score and their opponent's score.In one turn, a player can either add to his score any e...

2018-09-11 11:05:19 344

原创 B Non-Coprime Partition(构造+思维)

Find out if it is possible to partition the first n positive integers into two non-empty disjoint sets S1 and S2such that:gcd(sum(S1),sum(S2))>1Here sum(S)denotes the sum of all elements pr...

2018-09-08 11:14:14 460

原创 D. Valid BFS? (BFS)

The BFS algorithm is defined as follows.Consider an undirected graph with vertices numbered from 1to n. Initialize q as a new queue containing only vertex 1, mark the vertex 1as used. Extract a ...

2018-09-06 16:44:39 489

原创 Fibonacci Tree HDU - 4786 (最小生成树)

  Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem:  Consider a bidirectional graph ...

2018-09-06 11:13:28 249

原创 C. Equalize(思维)

You are given two binary strings a and b of the same length. You can perform the following two operations on the string a:Swap any two bits at indices iand j respectively (1≤i,j≤n), the cost of t...

2018-09-05 16:23:53 447

原创 B. Reach Median(思维)

You are given an array a of n integers and an integer s. It is guaranteed that nis odd.In one operation you can either increase or decrease any single element by one. Calculate the minimum number ...

2018-09-05 15:58:05 305

原创 1008B. Turn the Rectangles(贪心)

There are n rectangles in a row. You can either turn each rectangle by 90degrees or leave it as it is. If you turn a rectangle, its width will be height, and its height will be width. Notice that yo...

2018-09-05 10:54:29 170

原创 ACM-ICPC 2018 南京赛区网络预赛 Magical Girl Haze(分层图最短路)

There are NNN cities in the country, and MMM directional roads from uuu to v(1≤u,v≤n)v(1\le u, v\le n)v(1≤u,v≤n). Every road has a distance cic_ici​. Haze is a Magical Girl that lives in City 111, she...

2018-09-03 17:01:28 322

原创 1028A. Find Square(思维)

Consider a table of size n×m, initially fully white. Rows are numbered 1 through n from top to bottom, columns 1 through mfrom left to right. Some square inside the table with odd side length was pa...

2018-09-02 21:01:51 335

原创 1029D. Concatenated Multiples(思维+数学)

You are given an array a, consisting of npositive integers.Let's call a concatenation of numbers xand y the number that is obtained by writing down numbers x and y one right after another withou...

2018-09-02 16:21:21 438 1

原创 1029C. Maximal Intersection

You are given nsegments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each ot...

2018-09-02 11:29:26 175

原创 1029B. Creating the Contest(尺取法)

You are given a problemset consisting of n problems. The difficulty of the i-th problem is ai. It is guaranteed that all difficulties are distinct and are given in the increasing order.You have to...

2018-09-02 10:25:56 202

原创 1029A. Many Equal Substrings(字符串+思维)

You are given a string t consisting of n lowercase Latin letters and an integer number k.Let's define a substring of some string swith indices from l to r as s[l…r].Your task is to construct...

2018-09-02 09:55:05 928

原创 Function HDU - 5875 (思维)

The shorter, the simpler. With this problem, you should be convinced of this truth.    You are given an array A of N postive integers, and M queries in the form (l,r). A function F(l,r) (1≤l≤r≤N) is...

2018-08-31 15:47:32 169

原创 Friends and Enemies HDU - 5874(思维)

On an isolated island, lived some dwarves. A king (not a dwarf) ruled the island and the seas nearby, there are abundant cobblestones of varying colors on the island. Every two dwarves on the island a...

2018-08-31 11:04:53 205 1

原创 Sparse Graph HDU - 5876 (补图的最短路)

In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent if and only if they are not adjacent in G.Now you are given an undirec...

2018-08-31 10:17:15 196

原创 2018中国大学生程序设计竞赛 - 网络选拔赛 Buy and Resell(贪心)

Problem DescriptionThe Power Cube is used as a stash of Exotic Power. There are n cities numbered 1,2,…,n where allowed to trade it. The trading price of the Power Cube in the i-th city is ai dollar...

2018-08-27 17:12:29 198

原创 2018中国大学生程序设计竞赛 - 网络选拔赛 Find Integer(勾股数)

Problem Descriptionpeople in USSS love math very much, and there is a famous math problem .give you two integers n,a,you are required to find 2 integers b,c such that an+bn=cn.  Inputone li...

2018-08-27 15:46:51 221

原创 Ice_cream’s world II(最小树形图+朱刘算法)

Problem DescriptionAfter awarded lands to ACMers, the queen want to choose a city be her capital. This is an important event in ice_cream world, and it also a very difficult problem, because the wor...

2018-08-23 20:58:01 217

转载 使用fiddler对手机上的程序进行抓包

用fiddler对手机上的程序进行抓包,网上有很多的资料,这里写一下来进行备用。 前提:1.必须确保安装fiddler的电脑和手机在同一个wifi环境下备注:如果电脑用的是台式机,可以安装一个随身wifi,来确保台式机和手机在同一wifi环境下 安装配置步骤:1.下载一个fiddler,网上随便下一个就可以了2.配置fiddlerTools->Fiddle...

2018-08-22 19:31:08 202

原创 Party (2-sat问题)

有n对夫妻被邀请参加一个聚会,因为场地的问题,每对夫妻中只有1人可以列席。在2n 个人中,某些人之间有着很大的矛盾(当然夫妻之间是没有矛盾的),有矛盾的2个人是不会同时出现在聚会上的。有没有可能会有n 个人同时列席?Inputn: 表示有n对夫妻被邀请 (n<= 1000)m: 表示有m 对矛盾关系 ( m < (n - 1) * (n -1))在接下来的m行中,每行会有4...

2018-08-16 11:12:56 396

原创 B - Atm (tarjan缩点 + SPFA最长路)

Siruseri 城中的道路都是单向的。不同的道路由路口连接。按照法律的规定, 在每个路口都设立了一个 Siruseri 银行的 ATM 取款机。令人奇怪的是,Siruseri 的酒吧也都设在路口,虽然并不是每个路口都设有酒吧。Banditji 计划实施 Siruseri 有史以来最惊天动地的 ATM 抢劫。他将从市中心 出发,沿着单向道路行驶,抢劫所有他途径的 ATM 机,最终他将在...

2018-08-12 11:18:49 170

原创 B. Planning The Expedition(思维)

Natasha is planning an expedition to Mars for npeople. One of the important tasks is to provide food for each participant.The warehouse has mdaily food packages. Each package has some food type ...

2018-08-11 17:08:00 603

原创 求三角形【内心,外心,重心,垂心】

三角形的重心,外心,垂心,内心和旁心称之为三角形的五心。三角形五心定理是指三角形重心定理,外心定理,垂心定理,内心定理,旁心定理的总称,本文主要根据五心的性质求三角形的五心。设三角形为ABC, a=BC, b=CA, c=AB先准备一下需要的变量和函数struct Point{ double x,y; Point(){ } Point(double xx,double y...

2018-08-09 11:09:40 30980 3

原创 Triangle (旋转卡壳求最大三角形面积)

Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points.InputThe input consists of several test cases. The first ...

2018-08-05 13:16:11 680

转载 PHP环境搭建

php手动搭建环境有好多种组合,版本号不一致,会导致搭建失败。我搭建的组合是: php5.6+MySQL5.6+Apache2.4的组合。 一、PHP语言包下载 首先从官网上下载php5.6 http://windows.php.net/download#php-5.6 选择完整版下载: 二、 Apache服务器下载首先从官网上下载Apache2.4  ht...

2018-08-04 14:19:57 221

原创 Beauty Contest (求解凸包+旋转卡壳求直径)

经过一番挣扎,WNJXYK还是成功逃脱了,他来到了学校的后花园,后花园里有N个草堆 (2 <= N <= 50,000) ,每个草堆用(x,y)的坐标来表示(-10,000 <=x,y<= 10,000),当然两个草堆不可能在同一个坐标。WNJXYK决定躲在其中一个草堆里。吸取了上题翻车的经验,WNJXYK决定先计算一下自己的躲法安不安全,于是他想知道这些草垛之间,距离...

2018-08-03 18:43:15 211

原创 Summer holiday (求解凸包)

Summer holiday was coming! Xiaomao went back to his hometown where he yearn day and night, his hometown has picturesque scenery. There is a big forest beside his village. There are n trees in the fore...

2018-08-03 18:14:30 292

原创 transaction transaction transaction HDU - 6201 (无向图最长路SPFA)

Kelukin is a businessman. Every day, he travels around cities to do some business. On August 17th, in memory of a great man, citizens will read a book named "the Man Who Changed China". Of course, Kel...

2018-08-03 16:08:55 258

原创 Scrambled Polygon POJ - 2007 (极角排序)

A closed polygon is a figure bounded by a finite number of line segments. The intersections of the bounding line segments are called the vertices of the polygon. When one starts at any vertex of a clo...

2018-08-02 21:50:13 175

原创 Beauty Contest POJ - 2187 (GrahamScan算法求解凸包)

Bessie, Farmer John's prize cow, has just won first place in a bovine beauty contest, earning the title 'Miss Cow World'. As a result, Bessie will make a tour of N (2 <= N <= 50,000) farms aroun...

2018-08-02 20:25:03 162

原创 求解任意多边形面积

给出n个点在直角坐标系下的坐标(x,y),求解由n个点构成多边形的面积通常求解多边形的面积会转化为求解n-2个三角形面积和但是这样免不了繁琐的算法,编程复杂度和时间复杂度都很差。根据矢量叉乘的几何意义 矢量A与矢量B的矢量积是一个矢量,其模等于由A和B作成的平行四边形的面积,下面给出一个公式。要先将点按逆时针顺序排序极点排序#include<cstdio>#inc...

2018-08-02 14:55:49 960

原创 极角排序详解

一.相关定义在平面内取一个定点O,叫极点,引一条射线Ox,叫做极轴,再选定一个长度单位和角度的正方向(通常取逆时针方向)。对于平面内任何一点M,用ρ表示线段OM的长度(有时也用r表示),θ表示从Ox到OM的角度,ρ叫做点M的极径,θ叫做点M的极角,有序数对 (ρ,θ)就叫点M的极坐标,这样建立的坐标系叫做极坐标系。在通常情况下,我们需要将这些点按照一个选定的中心顺(逆)时针排序。二.排...

2018-08-02 14:47:48 1729

原创 Highways(Prim算法)

The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They're pla...

2018-07-28 16:32:07 209

原创 Watchcow(Fleuryu打印欧拉路径 )

Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing any evil. She begins at the barn, makes her patrol, ...

2018-07-28 15:05:08 160

空空如也

空空如也

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

TA关注的人

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