1088-Gnome Sequencing
描述
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的更多相关文章
- POJ解题经验交流
感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理. 题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...
- 如何保存gnome的linux的 会话?相当于windows下的休眠?
在关机前, 你进行的所有操作, 的集合, 就叫做你跟 linux系统 机器间的 一次 会话, 一个session. linux 可以 在关机时保存 这些session, 保存这些打开的窗口 和程序. ...
- 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 ...
- Linux下GNOME桌面的安装
yum grouplist //列出yum仓库里的软件组列表 GNOME桌面的安装 yum install soft1 soft2 //使用yum源安装软件 yum groupinstall grou ...
- 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 ...
- 为CentOS7(文字界面操作)系统安装gnome图形界面程序
1.安装gnome sudo yum groupinstall "GNOME Desktop" "Graphical Administration Tools" ...
- RHEL 6.6安装桌面环境GNOME
在测试服务器(Red Hat Enterprise Linux Server release 6.6)需要安装桌面系统环境,于是选择GNOME桌面环境安装. 一:检查系统的运行级别以及是否安装了桌面环 ...
- Fedora 24 Gnome Boxes 无法ping通网络
安装Fedora 24在试用虚拟机时发现无法ping通外网. 我傻傻地以为是软件问题. 问题描述: 尝试ping程序来测试网络连通性: (我之前也是ping百度,后来在为了少打字百度了一些比较短的域名 ...
- Ubuntu GNOME 16.10 Beta 1问世了!
导读 Ubuntu GNOME 16.10操作系统已经进入研发周期一段时间了,今天终于可以下载Beta 1版本进行测试了.作为Ubuntu官方flavor之一,Ubuntu GNOME团队非常努力的整 ...
- 号外!GNOME 3.22 正式发布喽!!!
导读 经过半年的努力开发,别名为“卡尔斯鲁厄”的 GNOME 3.22 正式发布了!“GNOME Software 可以安装和更新 Flatpak 软件包,GNOME Builder 则可以创建它们, ...
随机推荐
- 解决了jQuery插件未能导入到项目之中
Loading jQuery plugins from third-party scripts <script src="js/jquery.js" type="t ...
- JavaScript知识点回顾
一 浏览器对象树 window:处于对象树中的最高层,表示一个浏览器窗口,由于唯一,可以省略不写.(window.document 等价 document) Forms.Images.Links ...
- CSS3 过渡transition 认识
其实,我一直觉得自己对新知识是以一种抵触的情绪在学习的.因为我总是习惯于将事情想得很复杂,所以也错过了很多美好的东西. 以前觉得CSS3的知识应该是很难的,很难理解的.但是我发现我觉得知识点很难,是因 ...
- 一点关于this的理解
关于this,是很多前端面试必考的题目,有时候在网上看到这些题目,自己试了一下,额,还真的错了!在实际开发中,也会遇到 this 的问题(虽然一些类库会帮我们处理),例如在使用一些框架的时候,例如:k ...
- C#学习笔记14:面向对象继承的特点和里氏转换
面向对象: 继承:减少代码. 单根性 传递性 子类没有从父类那里继承了构造函数,只是会默认的调用父类那个无参数的构造函数 Class person { Public String Name { Ge ...
- 解决Redis Cluster模式下的排序问题
通常的redis排序我们可以这么做: 比如按商品价格排序:sort goods_id_set by p_*_price 这样在非集群模式下是没问题的,但如果在集群模式下,就会报错: 说是在集群模式下不 ...
- iOS开发——极光推送
1.到极光官网 https://www.jpush.cn/ 下载极光推送SDK. 具体如何集成最好参考官网的文档,以及一些失败的原因.文档非常详细,我也是参考集成的. 2.到极光推送官网注册自己的应用 ...
- iOS中 常用的mac终端指令
1.使用caffeinate阻止Mac运行屏幕保护和睡眠 caffeinate能阻止Mac进入睡眠状态,而且屏幕保护也不会激活.我们最好使用-t为命令加入具体的时间.比如下面的命令可以使Mac一小时内 ...
- [.Net MVC] Win7下IIS部署
这里简单的分三步实现网站的部署. 一.发布 VS2013中有发布选项,在需要发布的工程项目上(就是设置为启动项目的那个)右键,点“发布”选项: 然后会弹出一个窗口: 选择自定义,随便输入一个名字,然后 ...
- (CodeForces 510C) Fox And Names 拓扑排序
题目链接:http://codeforces.com/problemset/problem/510/C Fox Ciel is going to publish a paper on FOCS (Fo ...