[USACO15JAN] Cow Rectangles G
题目描述
The locations of Farmer John's N cows (1 <= N
输入格式
The first line of input contains N. Each of the next N lines describes a cow, and contains two integers and a character. The integers indicate a point (x,y) (0 <= x, y
输出格式
Print two integers. The first line should contain the maximum number of Holsteins that can be enclosed by a fence containing no Guernseys, and second line should contain the minimum area enclosed by such a fence.
5
1 1 H
2 2 H
3 3 G
4 4 H
6 6 H
2
1
提示
(暂无提示)
标签: P3117|2015|USACO|单调队列|离散化|前缀和|扫描线
来源
P3117|[USACO15JAN] Cow Rectangles G