zoukankan      html  css  js  c++  java
  • Four Inages Strateg

    Four Inages Strategy

     
     Accepts: 186
     
     Submissions: 1374
     Time Limit: 2000/1000 MS (Java/Others)
     
     Memory Limit: 65536/65536 K (Java/Others)
    Problem Description

    Young F found a secret record which inherited from ancient times in ancestral home by accident, which named "Four Inages Strategy". He couldn't restrain inner exciting, open the record, and read it carefully. " Place four magic stones at four points as array element in space, if four magic stones form a square, then strategy activates, destroying enemy around". Young F traveled to all corners of the country, and have collected four magic stones finally. He placed four magic stones at four points, but didn't know whether strategy could active successfully. So, could you help him?

    Input

    Multiple test cases, the first line contains an integer T(no more than 10000), indicating the number of cases. Each test case contains twelve integers x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,|x|,|y|,|z|100000,representing coordinate of four points. Any pair of points are distinct.

    Output

    For each case, the output should occupies exactly one line. The output format is Case #xans, here x is the data number begins at 1, if your answer is yes,ans is Yes, otherwise ans is No.

    Sample Input
    2
    0 0 0 0 1 0 1 0 0 1 1 0
    1 1 1 2 2 2 3 3 3 4 4 4
    Sample Output
    Case #1: Yes
    Case #2: No
    

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    html和js的编码格式
    如何通过webStorm快速恢复误删除的工程
    模板使用的一个坑
    一个字符串处理的小算法题
    工信部,映射,映射端口,热备,磁盘,虚拟磁盘,冗余,磁盘阵列技术,廉价冗余磁盘阵列 ,RAID 0,RAID1 ,RAID 3,RAID 5,RAID 6 名词解释
    项目管理,REID,矩阵,终端,镜像,Voip,AVB,串口,串口服务器,数据库,数据仓库,码流,心跳包,名词解释
    TCP协议,UDP协议,Utp,双绞线,DHCP协议,子网掩码,LAN,VLAN,网口,服务器,UI设计,Linux系统,Unix系统,名词解释
    IOS,ISO,OSI,交换机,路由器,MAC地址,网卡,网关,DNS,DNS服务器,名词解释
    中控,I/O端口,继电器,红外接口,编码器,解码器,主机,名词解释
    产品需求的讨论收集,整理描述,反馈实现,实施与验收使用,步骤方法与心得
  • 原文地址:https://www.cnblogs.com/Tobyuyu/p/4965476.html
Copyright © 2011-2022 走看看