编程介的小学生 2019-03-17 15:04 采纳率: 20.5%
浏览 177

扫描图上的顶点的一个算法的难题,用C语言怎么才能解决这个题目

Problem Description
If you are fond of ACM , you must have know the word “Convex Hall ” . which can forms a convex polygon .
Now we define the size of a convex hall as the number of edges it contains .
Give you several points , you can choose some points to form a Convex Hall .Can you tell me the biggest size of convex hall you may find?
What’s more , the convex hall must contains the point (0,0).

Input
Each test case will contains an integer n (2<= n<= 100 ), which stands for the number of points you are given besides (0,0).
Then n lines follow. Each line contains two integers x and y ( 0<=x, y <=100) , mean the coordinate of the point .
You may suppose you can at least find a convex hall with 3 edges.

Output
For each case, output the biggest size of convex hall in one line.

Sample Input
4
0 1
1 0
0 2
2 0

Sample Output
3

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试