04 2017 档案

摘要:Description 营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一 阅读全文
posted @ 2017-04-27 00:58 Robin! 阅读(209) 评论(0) 推荐(0)
摘要:对于splay核心是旋转和伸展,其他操作基本都是利用伸展的特性: 阅读全文
posted @ 2017-04-26 17:06 Robin! 阅读(399) 评论(0) 推荐(0)
摘要:Kruskal 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 10, 阅读全文
posted @ 2017-04-25 08:44 Robin! 阅读(702) 评论(0) 推荐(0)
摘要:Introduction You are the lead programmer for the Securitron 9042, the latest and greatest in home security software from Jellern Inc. (Motto: We secur 阅读全文
posted @ 2017-04-24 20:31 Robin! 阅读(228) 评论(0) 推荐(0)
摘要:1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 #include<set> 6 #include<map> 7 #include<queue> 8 using namespace 阅读全文
posted @ 2017-04-23 10:51 Robin! 阅读(200) 评论(0) 推荐(0)
摘要:Problem You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an interna 阅读全文
posted @ 2017-04-20 21:55 Robin! 阅读(181) 评论(0) 推荐(0)
摘要:Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wa 阅读全文
posted @ 2017-04-20 19:59 Robin! 阅读(162) 评论(0) 推荐(0)
摘要:Description A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list 阅读全文
posted @ 2017-04-18 22:32 Robin! 阅读(172) 评论(0) 推荐(0)
摘要:Description 每当西瓜的朋友来西瓜家看他,西瓜总是喜欢带他们逛自己的豪宅。西瓜的豪宅有N幢楼(1<=N<=1000),用1到N的整数编号。1号楼是西瓜豪宅的大门,N号楼是西瓜的储藏室。西瓜的豪宅里总共有M条道路(1<=M<=10000)。每条道路连接两栋不同的楼房,道路的长度不超过3500 阅读全文
posted @ 2017-04-17 21:38 Robin! 阅读(225) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 struct Edge { 7 int from, to, cap, flow, cost; 8 }; 9 10 ... 阅读全文
posted @ 2017-04-17 21:32 Robin! 阅读(1121) 评论(0) 推荐(0)
摘要:Dinic算法 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 阅读全文
posted @ 2017-04-17 20:34 Robin! 阅读(647) 评论(0) 推荐(0)
摘要:Description ​ZJ和ZCX在一起很久了,两个人都互生爱意,最终决定喜结良缘,从此踏入浪漫的婚姻殿堂。 但是,ZJ的好基友们想到以后ZJ就不能经常跟他们一起愉快的玩耍了,都觉得非常伤心难过,于是他们决定在最后一晚为ZJ开一场单身晚会,玩整晚紧张刺激的飞行棋。 ZJ的好基友居住在城市的各个地 阅读全文
posted @ 2017-04-16 12:51 Robin! 阅读(152) 评论(0) 推荐(0)
摘要:题目链接:https://vjudge.net/problem/UVA-11324 题目大意:给定一张有向图G,求一个结点数最大的结点集,集合中每两个点都至少有一条路径相连(方向任意)。 题解: 易知如果一个点被选择,则它所在强连通分量中的其他点也一定要选,如果不选,则其他点也不可选,因此先求出强连 阅读全文
posted @ 2017-04-15 22:17 Robin! 阅读(235) 评论(0) 推荐(0)
摘要:两次dfs模板: 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1000 + 5; 阅读全文
posted @ 2017-04-15 21:39 Robin! 阅读(139) 评论(0) 推荐(0)
摘要:题目链接:https://vjudge.net/problem/UVA-10765 题目大意:一个无向图中,求去掉每个点后的连通分量的数量。 题解: 这题实际上是求割顶,记录一下割顶的子孙当中反向边不在它之上的连通分量数量,最后加上图初始的连通分量数量。 代码: 阅读全文
posted @ 2017-04-15 20:45 Robin! 阅读(263) 评论(0) 推荐(0)
摘要:给你一个长度为N的数组,一个长为K的滑动的窗体从最左移至最右端,你只能见到窗口的K个数,每次窗体向右移动一位,如下表: 你的任务是找出窗口在各位置时的max value,min value. 单调队列的入门题,单调队列我的理解有对时间和大小都单调,只会在队列两端进行操作(队尾前移看大小,队头后移看时 阅读全文
posted @ 2017-04-15 19:45 Robin! 阅读(217) 评论(0) 推荐(0)
摘要:点双连通分量模板(Tarjan算法) 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define M(a, b) memset(a, b, sizeof(a)) 4 #define INF 0x3f3f3f3f 5 const int N = 阅读全文
posted @ 2017-04-13 21:44 Robin! 阅读(233) 评论(0) 推荐(0)
摘要:Description 小明是一个非常浪漫的画家,他喜欢画各种奇奇怪怪的画,虽然没人理解他画的究竟是什么东西。 有一天,他突发奇想,对于一根木条,他每次从木条中选取一个区间[l,r]进行染色,经过多次染色后,他想知道在[a,b]区间中有几个未被染色的子区间? 可惜小明虽然画画非常厉害,但是并不擅长解 阅读全文
posted @ 2017-04-09 15:37 Robin! 阅读(237) 评论(0) 推荐(0)
摘要:Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st 阅读全文
posted @ 2017-04-07 21:51 Robin! 阅读(145) 评论(0) 推荐(0)
摘要:Description A supermarket in Tehran is open 24 hours a day every day and needs a number of cashiers to fit its need. The supermarket manager has hired 阅读全文
posted @ 2017-04-07 18:05 Robin! 阅读(200) 评论(0) 推荐(0)
摘要:Description Once, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was 阅读全文
posted @ 2017-04-06 22:19 Robin! 阅读(196) 评论(0) 推荐(0)
摘要:1.HDU-1542 Atlantis Problem Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these t 阅读全文
posted @ 2017-04-02 23:04 Robin! 阅读(376) 评论(0) 推荐(0)
摘要:Description 在经济全球化浪潮的影响下,习惯于漫步在清晨的乡间小路的邮递员Blue Mary也开始骑着摩托车传递邮件了。 不过,她经常回忆起以前在乡间漫步的情景。昔日,乡下有依次编号为1..n的n个小村庄,某些村庄之间有一些双 向的土路。从每个村庄都恰好有一条路径到达村庄1(即比特堡)。并 阅读全文
posted @ 2017-04-01 19:00 Robin! 阅读(226) 评论(0) 推荐(0)