Description
给定平面上N个点, 请找出这N个点的凸包.
Input
第一行输入M表示包含M组测试数据,每组先输入N (N<=100), 接着输入N个坐标(x,y), x和y均为int型整数.
Output
以最下最左点开始逆时针输出凸包, 若有多个点在同一坐标,只输出一个,若凸包上有多个点在同一线上,只输出两端点.
Sample Input
2
7 1 1 4 1 4 4 4 4 1 4 2 2 5 5
8 5 6 8 3 1 8 5 7 3 5 3 5 1 8 2 11
Sample Output
case 1:
1 1
4 1
5 5
1 4
case 2:
8 3
2 11
1 8
3 5
完整代码:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
struct