自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 POJ-3279 Fliptile(爆枚优化)

Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate anM×Ngrid (1 ≤M≤ 15; 1 ≤N≤ 15)...

2019-04-22 17:28:18 197

转载 ubuntu dd命令制作启动盘

原文:https://blog.csdn.net/zeli1511/article/details/790198231、找到U盘:sudo fdisk -l2、卸载U盘:sudo umount /dev/sdb13、格式化U盘:sudo mkfs.vfat /dev/sdb -I4、制作启动盘:sudo dd if=~/Downloads/ubuntu-16.04-...

2019-04-13 10:42:45 1317

原创 HDU-1102 Constructing Roads (最小生成树+并查集)

Constructing RoadsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31254Accepted Submission(s): 11800Problem DescriptionThere are N ...

2019-04-10 17:03:34 147

原创 HDU-1272 小希的迷宫 (并查集)

Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小...

2019-04-09 18:01:08 110

原创 HDU-1978 How many ways

HDU-1978 How many waysProblem Description这是一个简单的生存游戏,你控制一个机器人从一个棋盘的起始点(1,1)走到棋盘的终点(n,m)。游戏的规则描述如下:1.机器人一开始在棋盘的起始点并有起始点所标有的能量。2.机器人只能向右或者向下走,并且每走一步消耗一单位能量。3.机器人不能在原地停留。4.当机器人选择了一条可行路径后,当他走到这条路径的终...

2019-04-08 23:59:33 153

原创 HDU-1078 FatMouse and Cheese

HDU-1078 FatMouse and CheeseProblem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 &lt...

2019-04-08 23:58:31 105

原创 HDU-1069 Monkey and Banana

HDU-1069 Monkey and BananaProblem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, p...

2019-04-08 23:55:36 80

原创 UVA-129 Krypton Factor (暴力枚举子列)

UVA-129 Krypton Factor (暴力枚举子列)You have been employed by the organisers of a Super Krypton Factor Contest in which contestantshave very high mental and physical abilities. In one section of the cont...

2019-04-08 23:54:45 120

原创 UVA-140 Bandwidth (枚举排列 next_permutation)

UVA-140 Bandwidth (枚举排列: next_permutation)Given a graph (V, E) where V is a set of nodes and E is a set of arcs inV ×V , and an ordering on the elements in V , then the bandwidth of anode v is defi...

2019-04-08 23:54:08 108

原创 UVA-725 Division (暴力枚举排列)

UVA-725 Division (暴力枚举排列)Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0through 9 once each, such that the first number divided by the second ...

2019-04-08 23:52:58 82

原创 UVA-1354 Mobile Computing(枚举二叉树)

Mobile Computing(枚举二叉树)There is a mysterious planet called Yaen, whose space is 2-dimensional. There are many beautifulstones on the planet, and the Yaen people love to collect them. They bring the ...

2019-04-08 23:52:10 165

原创 UVA-10603 Fill(状态图的BFS+贪心)

UVA-10603 FillThere are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greaterthan 200). The first and the second jug are initially empty, while the third is c...

2019-04-08 23:45:25 159

原创 线性空间——1 集合·映射

线性空间——1 集合·映射标签: 高等代数文章目录线性空间——1 集合·映射1.集合的表示1.元素与集合2. 集合的表示2.集合之间的关系3.映射1.映射的概念*示例1 数到数的映射(函数)**示例2 矩阵到数 和 数到矩阵的映射*2.映射乘法(结合律)3.映射的几个重要概念1.集合的表示1.元素与集合a 为 M 的元素(a 属于 M):a∈Ma \in Ma∈Ma 不为 M 的元素...

2019-03-21 14:05:09 949

原创 算法班第一节题解--信计182张家政

1001 最小公倍数Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70思路:找到两个数的所有因数,相乘即可#include &l...

2019-03-12 21:36:00 297

原创 牛客 寻找道路(BFS)

题目描述在有向图G中,每条边的长度均为1,现给定起点和终点,请你在图中找一条从起点到终点的路径,该路径满足以下条件:1.路径上的所有点的出边所指向的点都直接或间接与终点连通。2.在满足条件1的情况下使路径最短。注意:图G中可能存在重边和自环,题目保证终点没有出边。请你输出符合条件的路径的长度。输入描述:第一行有两个用一个空格隔开的整数n和m,表示图有n个点和m条边。接下来...

2019-03-05 21:59:25 656

原创 leetcode 15. 3Sum

这是一个寻找Mr/Mrs.Right的故事。先排序便于搜索。先 fix 一个数, 寻找另外两个匹配的数。用两个指针 丈夫和妻子。丈夫尺寸为 fix 的下一个数。妻子的尺寸为最后一个数, 他们的目的是合起来等于第 fix 个数的相反数。丈夫可以变大,妻子可以缩小。(通过某种手术,咳咳……)他们的初始和偏大,因为丈夫指向开头,所以无法变小,只能妻子变小为能和丈夫match的尺寸...

2019-02-18 17:35:47 76

原创 leetcode 98. Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key. The ...

2018-11-25 09:43:18 94

原创 leetcode 84. Largest Rectangle in Histogram

Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of ea...

2018-11-23 22:04:47 85

转载 理解KMP算法(转载)

作者:海纳链接:https://www.zhihu.com/question/21923021/answer/281346746来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 KMP算法的核心,是一个被称为部分匹配表(Partial Match Table)的数组。我觉得理解KMP的最大障碍就是很多人在看了很多关于KMP的文章之后,仍然搞不懂PMT中的值...

2018-11-21 13:53:51 217

空空如也

空空如也

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

TA关注的人

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