2017
文章平均质量分 74
「已注销」
干巴爹
展开
-
9-5 (线段树加扫描线)
扫描线 这类题目需要将一些操作排序,然后从左到右用一根扫描线(当然是在我们脑子里)扫过去 最典型的就是矩形面积并,周长并等题hdu1542 Atlantis 题意:矩形面积并 思路:浮点数先要离散化;然后把矩形分成两条边,上边和下边,对横轴建树,然后从下到上扫描上去,用cnt表示该区间下边比上边多几个,sum代表该区间内被覆盖的线段的长度总和 这里线段树的一个结点并非是线段的一个端点,而是原创 2017-09-05 01:45:22 · 231 阅读 · 0 评论 -
10-21 Walk through the forest(最短路预处理+建树)
Walk Through the ForestJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to walk home. To make things e原创 2017-10-22 00:53:54 · 365 阅读 · 0 评论 -
9-13 (图论之手练模板篇,存边小技巧)
一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽原创 2017-09-13 00:37:43 · 197 阅读 · 0 评论 -
9-12(思路gcd***, tarjan)
Arpa and a list of numberstime limit per test2 seconds memory limit per test256 megabytesArpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and gcd (see not原创 2017-09-12 00:58:12 · 249 阅读 · 0 评论 -
9-27 (最短路,两端思路)
Airport ExpressIn a small city called Iokh, a train service, Airport-Express, takes residents to the airport more quickly than other transports. There are two types of trains in Airport-Express, the原创 2017-09-28 00:24:05 · 265 阅读 · 0 评论 -
9-9 (hash, pb_ds)
pb_ds的内容稍微了解了一下, 参考博客: http://blog.csdn.net/wjf_wzzc/article/details/38851703 红黑树运用tree binary-searchEnglish Vietnamese In this problem, you have to maintain a dynamic set of numbers which support t原创 2017-09-10 01:33:59 · 410 阅读 · 0 评论 -
9-17 (水BFS,e24高精度, 最大流最小割, 思路T,卡AC自动机)
Fire! (BFS)Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze. Given Joe’s locat原创 2017-09-17 21:58:36 · 334 阅读 · 0 评论 -
9-8 (kruskal水)
Slim span求一棵生成树使最大的边和最小的边差值最小。注意并查集的使用+kruskal基本思路与原理#include <bits/stdc++.h>using namespace std;int n, m;const int maxn = 110;const int INF = 0x3f3f3f3f;int fa[maxn];struct edge{ int u, v, w原创 2017-09-09 09:05:32 · 496 阅读 · 0 评论 -
9-7 (空间推想,思路,图论水)
Five Dimensional PointsYou are given set of n points in 5-dimensional space. The points are labeled from 1 to n. No two points coincide.We will call point a bad if there are different points b and c, n原创 2017-09-08 19:20:44 · 288 阅读 · 0 评论 -
8-30(高斯,树状数组,分类讨论,stl)
uva 1592 自己代码:#include <bits/stdc++.h>using namespace std;const int maxnrow = 100;char row[maxnrow];const int maxn = 10010;const int maxm = 15;vector<int> vec[maxn];map<string, int> mark;int to原创 2017-08-31 00:09:40 · 246 阅读 · 0 评论 -
9-23 线段树***, 2-SAT, 两端小技巧
Minimum时间限制:1000ms 单点时限:1000ms 内存限制:256MB描述You are given a list of integers a0, a1, …, a2^k-1.You need to support two types of queries:Output Minx,y∈[l,r] {ax∙ay}.Let ax=y.输入The first line is an i原创 2017-09-23 19:41:06 · 216 阅读 · 0 评论 -
9-21 2-SAT,贪心,二分
Now or laterAs you must have experienced, instead of landing immediately, an aircraft sometimes waits in a holding loop close to the runway. This holding mechanism is required by air traffic controlle原创 2017-09-22 00:42:32 · 274 阅读 · 0 评论 -
9-22 deque, STL集锦
Brute Force SortingTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Problem DescriptionBeerus needs to sort an array of N integers. Algorithms are not Beerus’s strength.原创 2017-09-22 20:08:49 · 198 阅读 · 0 评论 -
9-13(周三训练赛-思路染色,费用流二分图Point)
先说一下最大流最小费用其实只是把EdmonsKarp网络流中的DFS换成Bellman Ford而已 注意区分+理解 网络流判断 : if(!a[e.to] && e.cap>e.flow) 费用流判断: if(e.cap>e.flow && d[e.to] > d[u]+e.cost)再提一下二分匹配了解概念: 完美匹配, 最大权完美匹配, 最大基数匹配 理解+熟悉特点 一个图是二原创 2017-09-13 22:11:18 · 300 阅读 · 0 评论 -
10-22 warfare and logistics(最短路树)
Warfare And LogisticsThe army of United Nations launched a new wave of air strikes on terrorist forces. The objective of the mission is to reduce enemy’s logistical mobility. Each air strike will dest原创 2017-10-23 01:15:49 · 323 阅读 · 0 评论