package com.leegh.parameterization/** * @author Guohui Li */class Pair[T 0) first else second}class Pair_Lower_Bound[T](val first: T, val second: T) ....
分类:
其他好文 时间:
2015-08-27 20:48:28
阅读次数:
150
题意:给一个树图,每个点的点权(比如颜色编号),m个询问,每个询问是一个区间[a,b],图中两点之间唯一路径上有多少个不同点权(即多少种颜色)。n 2 #define pii pair 3 #define INF 0x3f3f3f3f 4 #define LL long long 5 usi...
分类:
编程语言 时间:
2015-08-27 18:01:07
阅读次数:
2266
题目链接:uva 588 - Video Surveillance
求出多边形的核,如果非0即为可行,注意核退化成直线和点都是可以的,所以不能用面积去判断。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef pair pii;
const doubl...
分类:
其他好文 时间:
2015-08-27 15:30:09
阅读次数:
157
题目链接:uva 12307 - Smallest Enclosing Rectangle
两组踵对点围成长方形,枚举出所有可行长方形维护最小值。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef pair pii;
const double pi ...
分类:
其他好文 时间:
2015-08-27 15:28:58
阅读次数:
216
题目链接:uva 1340 - Find the Border
模仿别人代码写的卷包裹算法。就是沿着折线的外围走一圈,每次到一个新的点需要转弯时转向向右拐最多的那条。
#include
#include
#include
#include
#include
#include
using namespace std;
typedef pair pii;
const ...
分类:
其他好文 时间:
2015-08-27 13:26:37
阅读次数:
116
Description
Given an undirected weighted graph G, you should find one of spanning trees specified as follows.
The graph G is an ordered pair (V, E), where V is a set of vertices {v1,
v2, …, vn} a...
分类:
其他好文 时间:
2015-08-21 23:23:18
阅读次数:
255
Description
n participants of the competition were split into
m teams in some manner so that each team has at least one participant. After the competition each pair of participants from the same t...
分类:
其他好文 时间:
2015-08-21 21:33:41
阅读次数:
165
nparticipants of the competition were split intomteams in some manner so that each team has at least one participant. After the competition each pair ...
分类:
其他好文 时间:
2015-08-21 21:14:01
阅读次数:
128
nparticipants of the competition were split intomteams in some manner so that each team has at least one participant. After the competition each pair ...
分类:
其他好文 时间:
2015-08-21 21:03:46
阅读次数:
165
1010. Radix (25)Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal n...
分类:
其他好文 时间:
2015-08-20 22:20:22
阅读次数:
174