自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (1)
  • 收藏
  • 关注

原创 解决eclipse运行中出现的端口被占用问题

方法一步骤一:首先确定被占用的端口win+rcmd  找所有端口:netstat -ano找确定端口:netstat -ano|findstr 8080第二列最后几位为端口号  最后一列为pid 步骤二在任务管理器中找到该pid,结束process(发现是tomcat8.exe占用)成功解决~方法二步骤一:双击控制台server下的...

2018-09-29 12:48:11 7258

原创 ZCMU 1679: 查找2(upper_bound()函数)

Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 396  Solved: 139Description给你一个长度是n的序列A,然后,有m次询问,每次询问是一个数字X,请你告诉我X在序列A中有多少个数是不大于它的Input第一行 ,n,m,(n,m<=100000)第二行n个数(每个数<=1000)第三行m个数...

2018-09-13 16:55:24 226

原创 1989: Julyed(水)

Time Limit: 2 Sec  Memory Limit: 64 MBSubmit: 30  Solved: 28DescriptionJulyed is preparing for her CET-6. She has N words to remember, but there is only M days left. If she can’t remember all the...

2018-09-12 13:48:35 210

原创 ZCMU: 1821: 入学考试(dp背包)

Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 30  Solved: 24Description辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出了一个难题。医师把他带到一个到处都是草药的山洞里对他说:“孩子,这个山洞里有一些不同的草药,采每一株都需要一些时间,每一株也...

2018-09-11 20:00:58 172

原创 ZCMU 1620: 全排列

Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 242  Solved: 112Description给定n个数 a[0] , a[1] ........ a[n-1], 输出其全排列。 Input第一行输入一个数n,(n<7)接下来一行输入n个数。 Output按字典序从小到大输出全排列 Sampl...

2018-09-10 13:31:59 259

原创 灌溉 (图论+最小生成树+并查集)

到了旱季农业生产的灌溉就成了一个大问题。为了保证灌溉的顺利,某县政府决定投资为各个村之间建立灌溉管道。输入第1行包括一个整数N,表示某县的村庄的数量。(3≤N≤100),第2行-结尾为一个N×N的矩阵,表示每个村庄之间的距离。虽然在理论上,他们是N行,每行由N个用空格分隔的数组成,实际上,他们限制在80个字符,因此,某些行会紧接着另一些行。当然,对角线将会是0,因为不会有线路从第i个村到它本身...

2018-09-09 14:18:33 262

转载 PAT 1022 Digital Library(30 分)(字符串查找+vector+结构体)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...

2018-09-05 18:42:41 144

原创 #include<string>下的str.find()函数

str.find(ss)//返回字符串ss在str中的位置str.find(ss,num) //在str[num]~str[n-1]范围内查找并返回字符串ss在str的位置str.rfind(ss,num)////在str[0]~str[num]范围内查找并返回字符串ss在str的位置(reverse)例子:#include &lt;iostream&gt;using name...

2018-09-05 16:53:51 5686 1

原创 ZCMU 4941: 继续畅通工程(最小生成树+并查集+Kruskal算法)

Time Limit: 1 Sec  Memory Limit: 32 MBSubmit: 3  Solved: 3Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低...

2018-09-05 14:00:19 234

原创 ZCMU 4926: 还是畅通工程(最小生成树+并查集)

Time Limit: 1 Sec  Memory Limit: 32 MBSubmit: 5  Solved: 4Description        某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度...

2018-09-04 13:56:49 188

原创 PAT 1133 Splitting A Linked List(25 分)(结构体+链表)

Given a singly linked list, you are supposed to rearrange its elements so that all the negative values appear before all of the non-negatives, and all the values in [0, K] appear before all those grea...

2018-09-04 13:27:59 164

原创 PAT 1132 Cut Integer(20 分)(字符串)

Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B = 334. It is interesting...

2018-09-04 13:27:45 157

原创 PAT 1035 Password(20 分)(字符串+switch case + vector)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L ...

2018-09-04 13:27:18 134

原创 PAT 1145 Hashing - Average Search Time(25 分)(哈希+平均查找时间)

The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of integer keys from the table and output the average sea...

2018-09-04 13:27:08 242

原创 PAT 1013 Battle Over Cities(25 分)(dfs)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...

2018-09-04 13:26:50 129

原创 PAT 1046 Shortest Distance(20 分)(简单数组)

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file conta...

2018-09-03 10:11:48 136

原创 HDU 1232:畅通工程(连通分量+并查集)

Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 69579    Accepted Submission(s): 37236Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接...

2018-09-02 15:25:23 116

原创 PAT 1041 Be Unique(20 分)(哈希)

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​]. The first one who bets o...

2018-09-01 14:39:38 175

原创 PAT 1065 A+B and C (64bit)(20 分)(整数溢出)

Given three integers A, B and C in [−2​63​​,2​63​​], you are supposed to tell whether A+B&gt;C.Input Specification:The first line of the input gives the positive number of test cases, T (≤10). The...

2018-09-01 14:35:54 172

原创 PAT 1069 The Black Hole of Numbers(20 分)(do while循环)

For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by takin...

2018-09-01 14:21:42 89

原创 PAT 1028 List Sorting(25 分)(排序)

Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each case, the first line contains two...

2018-09-01 14:19:17 135

原创 PAT 1146 Topological Order(25 分)(拓扑排序)

This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topological order obtained from the given directed graph? Now you are supposed to write a program to test...

2018-09-01 13:17:09 196

空空如也

空空如也

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

TA关注的人

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