编程介的小学生 2019-08-26 21:56 采纳率: 20.5%
浏览 120

Fruit Ninja C语言怎么写的

Problem Description
Fruit Ninja is a popular classic game. During the game, fruits will up to the air, and your aim is cut as more fruits as possible with a line.

Even if the line touch a point of a fruit, the fruit also be cut.

Input
The first line is a number T(1<=T<=30), represents the number of case. The next T blocks follow each indicates a case.
The first line of each case contains one integer N (1<=N<=10)
Then N lines follow, each line contains a integer K(3<=K<=10), represent the number points of the fruit, then K*2 integers follow, each two integers represent one point of the fruit.(with anticlockwise order)
I promise all fruits are convex polygon, and any two fruit have no common point.

Output
For each case, output the number of case and the maximum fruits you could cut with a line.(as shown in the sample output)

Sample Input
2
3
3 0 0 1 0 1 1
3 1 2 2 1 2 2
3 3 1 3 0 4 0
3
4 0 0 1 0 1 1 0 1
4 2 0 3 0 3 1 2 1
4 0 99 1 99 1 100 0 100

Sample Output
Case 1: 3
Case 2: 2

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员