自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

vocaloid01的博客

菜鸡的笔记本~

  • 博客(15)
  • 收藏
  • 关注

原创 POJ 3436 ACM Computer Factory

As you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are historically produced at the same factory.Ever...

2018-06-23 16:31:44 112

原创 计蒜客——排涝(基础最大流入门)

1000ms 65536K ...

2018-06-11 22:39:52 214

原创 HDU - 1026 Ignatius and the Princess I

The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem ...

2018-06-07 21:20:41 209

原创 Prim and Kruskal算法使用模板

Prim 邻接矩阵版:#define INF 0x3f3f3f3fconst int MAXN = 105;int N;int map[MAXN][MAXN];bool book[MAXN];//true为已经加入树的,false则相反 int lenth[MAXN];//注意有的博客这里解释为根到各个点的距离,其实应该是“树”到各个点的距离 int Prime(){...

2018-06-06 19:54:52 319

原创 51Nod - 1212 无向图最小生成树

N个点M条边的无向连通图,每条边有一个权值,求该图的最小生成树。Input第1行:2个数N,M中间用空格分隔,N为点的数量,M为边的数量。(2 <= N <= 1000, 1 <= M <= 50000)第2 - M + 1行:每行3个数S E W,分别表示M条边的2个顶点及权值。(1 <= S, E <= N,1 <= W <= 100...

2018-06-06 19:32:14 293

原创 FZU - 2254 英语考试

在过三个礼拜,YellowStar有一场专业英语考试,因此它必须着手开始复习。 这天,YellowStar准备了n个需要背的单词,每个单词的长度均为m。 YellowSatr准备采用联想记忆法来背诵这n个单词: 1、如果YellowStar凭空背下一个新词T,需要消耗单词长度m的精力 2、如果YellowSatr之前已经背诵了一些单词,它可以选择其中一个单词Si,然后通过联想记忆的方法去背诵新词...

2018-06-06 18:40:14 144

原创 POJ 1389 Area of Simple Polygons(面积并)

There are N, 1 <= N <= 1,000 rectangles in the 2-D xy-plane. The four sides of a rectangle are horizontal or vertical line segments. Rectangles are defined by their lower-left and upper-right co...

2018-06-05 20:40:51 184

原创 hdu1828 Picture(线段树+离散化+扫描线+基础周长并模板)两种方法

A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally covered b...

2018-06-05 18:55:42 283

原创 51Nod - 1279 扔盘子(二分+思维)

有一口井,井的高度为N,每隔1个单位它的宽度有变化。现在从井口往下面扔圆盘,如果圆盘的宽度大于井在某个高度的宽度,则圆盘被卡住(恰好等于的话会下去)。盘子有几种命运:1、掉到井底。2、被卡住。3、落到别的盘子上方。盘子的高度也是单位高度。给定井的宽度和每个盘子的宽度,求最终落到井内的盘子数量。如图井和盘子信息如下: 井:5 6 4 3 6 2 3盘子:2 3 5 2 4...

2018-06-05 17:23:18 560

原创 C++ STL lower_bound,upper_bound的使用总结

头文件:#include <algorithm>时间复杂度:一次查询O(log n),n为数组长度。图示:lower_bound:功能:查找非递减序列[first,last) 内第一个大于或等于某个元素的位置。返回值:如果找到返回找到元素的地址否则返回last的地址。(这样不注意的话会越界,小心)用法:int t=lower_bound(a+l,a+r,key)-a;(a是数组)。up...

2018-06-05 17:15:08 8066

原创 Codeforces679A—— Bear and Prime 100(人生第一道交互题)

ime limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputThis is an interactive problem. In the output section below you will see the information abo...

2018-06-03 20:27:27 301

原创 HDU1255——覆盖的面积(线段树+离散+扫描线)

给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代表平面上的一个矩形的左上角坐标和右下角坐标,矩形的上下边和X轴平行,左右边和Y轴平行.坐标的范围从0到10000...

2018-06-02 09:14:29 136

原创 HDU 1542 Atlantis(线段树——扫描线 :基础面积并模板,离散x坐标,从下向上扫描 )

There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the island. But unfortunately, these maps describe diff...

2018-06-01 21:44:19 204

原创 二分查找模板

/*二分查找,找到该值在数组中的下标,否则为-1*/int binarySerach(int array[] , int length , int key) { int left = 1; int right = length; // 这里必须是 <= while (left <= right) { int mid = (left ...

2018-06-01 20:50:24 183

原创 hdu-4578-Transformation-线段树(区间更新区间求和,多lazy,绝世好题)

Time limit 8000 msMemory limit 65536 kB Yuanfang is puzzled with the question below: There are n integers, a 1, a 2, …, a n. The initial values of th...

2018-06-01 15:56:02 471

空空如也

空空如也

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

TA关注的人

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