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
    

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

  • 相关阅读:
    linux TCP数据包重传过程----小结
    linux TCP头部的构造的简单分析
    CentOS 7镜像下载
    JAVAEE——BOS物流项目03:学习计划、messager、menubutton、登陆拦截器、信息校验和取派员添加功能
    JAVAEE——BOS物流项目02:学习计划、动态添加选项卡、ztree、项目底层代码构建
    JAVAEE——BOS物流项目01:学习计划、搭建环境、主页设计(jQuery EasyUI)
    Maven02——回顾、整合ssh框架、分模块开发、私服
    巧妙取法——最小公倍数
    深度优先搜索——地宫取宝
    Maven01——简介、安装配置、入门程序、项目构建和依赖管理
  • 原文地址:https://www.cnblogs.com/Tobyuyu/p/4965476.html
Copyright © 2011-2022 走看看