描述

In the book All Creatures of Mythology, gnomes are kind, bearded creatures, while goblins tend to be bossy and simple-minded. The goblins like to harass the gnomes by making them line up in groups of three, ordered by the length of their beards. The gnomes, being of different physical heights, vary their arrangements to confuse the goblins. Therefore, the goblins must actually measure the beards in centimeters to see if everyone is lined up in order. Your task is to write a program to assist the goblins in determining whether or not the gnomes are lined up properly, either from shortest to longest beard or from longest to shortest.

输入

The input starts with line containing a single integer N, 0 < N < 30, which is the number of groups to process. Following this are N lines, each containing three distinct positive integers less than 100.

输出

There is a title line, then one line per set of beard lengths. See the sample output for capitalization and punctuation.

样例输入

3

40 62 77

88 62 77

91 33 18

样例输出

Gnomes:

Ordered

Unordered

Ordered

#include<iostream>
using namespace std;
int main()
{
int n,a,b,c;
cin>>n;
cout<<"Gnomes:"<<endl;
while(n--)
{
cin>>a>>b>>c;
if((a-b)*(b-c)<0) cout<<"Unordered"<<endl;
else cout<<"Ordered"<<endl;
}
return 0;
}

  

1088-Gnome Sequencing的更多相关文章

  1. POJ解题经验交流

    感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理.   题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...

  2. 如何保存gnome的linux的 会话?相当于windows下的休眠?

    在关机前, 你进行的所有操作, 的集合, 就叫做你跟 linux系统 机器间的 一次 会话, 一个session. linux 可以 在关机时保存 这些session, 保存这些打开的窗口 和程序. ...

  3. How to Fix GNOME License Not Accepted Issue on CentOS 7

    This post assume that you have just finished the Gnome GUI installation on CentOS 7 by using “yum gr ...

  4. Linux下GNOME桌面的安装

    yum grouplist //列出yum仓库里的软件组列表 GNOME桌面的安装 yum install soft1 soft2 //使用yum源安装软件 yum groupinstall grou ...

  5. Cannot run gnome extension in browser

    Error Message: We cannot detect a running copy of GNOME on this system, so some parts of the interfa ...

  6. 为CentOS7(文字界面操作)系统安装gnome图形界面程序

    1.安装gnome sudo yum groupinstall "GNOME Desktop" "Graphical Administration Tools" ...

  7. RHEL 6.6安装桌面环境GNOME

    在测试服务器(Red Hat Enterprise Linux Server release 6.6)需要安装桌面系统环境,于是选择GNOME桌面环境安装. 一:检查系统的运行级别以及是否安装了桌面环 ...

  8. Fedora 24 Gnome Boxes 无法ping通网络

    安装Fedora 24在试用虚拟机时发现无法ping通外网. 我傻傻地以为是软件问题. 问题描述: 尝试ping程序来测试网络连通性: (我之前也是ping百度,后来在为了少打字百度了一些比较短的域名 ...

  9. Ubuntu GNOME 16.10 Beta 1问世了!

    导读 Ubuntu GNOME 16.10操作系统已经进入研发周期一段时间了,今天终于可以下载Beta 1版本进行测试了.作为Ubuntu官方flavor之一,Ubuntu GNOME团队非常努力的整 ...

  10. 号外!GNOME 3.22 正式发布喽!!!

    导读 经过半年的努力开发,别名为“卡尔斯鲁厄”的 GNOME 3.22 正式发布了!“GNOME Software 可以安装和更新 Flatpak 软件包,GNOME Builder 则可以创建它们, ...

随机推荐

  1. [记录]calculate age based on date of birth

    calculate age based on date of birth know one new webiste:eval.in run php code

  2. videojs 动态加载视频

    VideoJS dynamic source change via RESTful API 'Undefined' issue with changing RTMP source on compres ...

  3. GitHub这么火,程序员你不学学吗? 超简单入门教程 干货

    本GitHub教程旨在能够帮助大家快速入门学习使用GitHub. 本文章由做全栈攻城狮-写代码也要读书,爱全栈,更爱生活.原创.如有转载,请注明出处. GitHub是什么? GitHub首先是个分布式 ...

  4. MongoDB 的分组操作 In C#

    C#对mongodb的分组查询操作,主要通过脚本或Aggregate方法来实现,以下通过一些实例作解析: 参考资料:http://www.tuicool.com/articles/2iqUZj   h ...

  5. ie编程半天的学习总结

    自己好久没有来这个博客了,自己陆续去几个地方写博客,一个c++博客园,一个csdn. 感觉都一般吧,看不到什么好的博客,可能自己没有看到吧.以后就在这个博客记录一点技术笔记吧!自己比较懒,只要做为记录 ...

  6. Java 7 新的 try-with-resources 语句,自动资源释放

    Java 7 的编译器和运行环境支持新的 try-with-resources 语句,称为 ARM 块(Automatic Resource Management) ,自动资源管理. 新的语句支持包括 ...

  7. HDOJ 1042 N! -- 大数运算

    题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1042 Problem Description Given an integer N(0 ≤ N ≤ 1 ...

  8. 配置php的CAS客户端

    1.下载安装xmapp 2.开启Apache服务. 3.下载php的CAS客户端源码包(我使用的是CAS-1.2.0.tgz),解压到xmap的htdocs目录下(D:\xmapp\htdocs),进 ...

  9. Windows Phone 动态改变ListBox样式

    使用ListBox时通常会借助ItemTemplate帮助我们实现更复杂多样的样式显示,体现了Xaml的灵活.如何动态改变变ListBox的样式,实现类似电脑资源管理器中列表显示和图标显示形式的替换. ...

  10. 生产项目加入到SVN版本控制

    零.介绍 每天定时备份是通过ftp打包和同步的方式,这些都是比较粗的备份,没法恢复到指定时间的文件,所以需要用到svn控制版本. (请不要问我为什么不用git) 一.现有项目文件加入版本控制 因为项目 ...