首页 > 其他分享 >北大ACM poj3913 Gnome Sequencing

北大ACM poj3913 Gnome Sequencing

时间:2023-08-21 17:07:00浏览次数:46  
标签:goblins Gnome d% up poj3913 gnomes Sequencing line Gnomes


Gnome Sequencing


Time Limit: 1000MS

 

Memory Limit: 65536K

Total Submissions: 1267

 

Accepted: 865


Description


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.


Input


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.


Output


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


Sample Input


3 40 62 77 88 62 77 91 33 18


Sample Output


Gnomes: Ordered Unordered Ordered


 

 

#include<stdio.h>
main()
{
	int n,a,b,c;
	scanf("%d",&n);
	puts("Gnomes:");
	while(n--)
	{
		scanf("%d%d%d",&a,&b,&c);
		if((a>=b&&b>=c)||(a<=b&&b<=c))puts("Ordered");
		else puts("Unordered");
	}
}

 

标签:goblins,Gnome,d%,up,poj3913,gnomes,Sequencing,line,Gnomes
From: https://blog.51cto.com/u_10101161/7177239

相关文章

  • debian+gnome桌面图标显示
    1.安装插件$sudoaptinstallgnome-shell-extension-desktop-icons安装完成后,需要重启.2.打开插件设置Activities->Extensions找到DesktopIcons,打开即可.3.设置完成后,桌面可以放置文件和文件夹了,并且右键可以打开终端了.......
  • ubuntu gnome桌面 输入密码后只有壁纸没有图标
    原因:配置文件的问题,无法加载进入图形界面解决方法:ctrl+alt+f2/f3/f4/f5进入命令行界面,输入用户名密码登录可以先ls看看是否有我下面要删除的这些文件,有的话就继续看,没有的话就另寻他法输入以下指令sudorm-rf.cache/gnome-software/sudorm-rf.configsudorm......
  • CodeForces 1525F Goblins And Gnomes
    洛谷传送门CF传送门套路地,将DAG的最小不交路径覆盖转化为点数减去拆点以后最大匹配。感性理解就是一开始每个点都是一条路径,一个匹配意味着两条路径结合了。由题意知,第\(i\)次进攻时最小不交路径覆盖必须\(>i\),也就是说,设最大匹配为\(k\),那么\(n-k>i\),即\(k\le......
  • Ubuntu20.04 开机卡在“starting Gnome Display Manager”
    今天ubuntu开机遇到了该问题:解决方法:https://blog.csdn.net/qq_42680785/article/details/116195840sudoaptautoremove--purgesnapd//清理磁盘空间......
  • Sentieon | 每周文献-Population Sequencing-第一期
    群体基因组系列文章-1标题(英文):TheImpactofACEsonBMI:AnInvestigationoftheGenotype-EnvironmentEffectsofBMI标题(中文):ACEs对BMI的影响:探究BMI的基因型-环境效应发表期刊:BehaviorGenetics作者单位:美国俄勒冈州立大学心理学系发表年份:2022文章地址:https://doi.......
  • Sentieon | 每周文献-Tumor Sequencing-第三期
     肿瘤测序系列文章-1标题(英文):Therelationshipbetweengeneticcharacteristicsandclinicalcharacteristicsandtheefficacyof 131Itherapyinchildrenandadolescentswithlocallyadvancedormetastaticdifferentiatedthyroidcancer标题(中文):局部晚期或......
  • 解决Ubuntu 20.04升级后gnome-control-center设置程序无法打开问题
    解决Ubuntu20.04升级后gnome-control-center设置程序无法打开问题Ubuntu20.04系统升级后,发现gnome设置程序无法正常打开了。在终端运行命令查看错误信息,运行以下命令:sudognome-control-center从显示的错误信息可以看出,其调用的一些so文件,需要高版本的libc6,而Ubuntu20.0......
  • GNOME 卸载nvidia官方闭源驱动
    系统信息KaliGNOME44.1X11Ctrl+Alt+F3进入无桌面终端,然后关掉桌面sudoservicegdm3stop卸载驱动sudonvidia-uninstall......
  • Debian11安装GNOME-TWEAKS报错WARNING : Shell not installed or running
    先写结论:打开方式是按下Alt+F2弹出命令窗输入gnome-tweaks,就会弹出优化界面,点击扩展就可以按需开启扩展插件。还有一种方法,如果你在安装debian11系统时安装完了GNOME,那么你可以在显示应用程序内找到一个叫工具的软件合集,内有名叫优化的程序。闲聊:不过其实一开始我就注意到了有这......
  • GNOME 2017 亚洲峰会确定将在中国重庆举办
    经过长达6个月的评选和决议,今天传出最新消息,GNOME基金会和GNOMEAsia委员会投票决议,今年的2017年GNOMEAsiaSummit(GNOME亚洲峰会)将在重庆举办,这也是该大会继北京、越南胡志明、台北、印度班加罗尔、香港和韩国首尔、印尼雅加达后,首次来到中国西部城市举办,也是首个国际......