Problem description

Vasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first time, that is Vasya is the sleuth, he should investigate a "crime" and find out what is happening. He can ask any questions whatsoever that can be answered with "Yes" or "No". All the rest agree beforehand to answer the questions like that: if the question’s last letter is a vowel, they answer "Yes" and if the last letter is a consonant, they answer "No". Of course, the sleuth knows nothing about it and his task is to understand that.

Unfortunately, Vasya is not very smart. After 5 hours of endless stupid questions everybody except Vasya got bored. That’s why Vasya’s friends ask you to write a program that would give answers instead of them.

The English alphabet vowels are: A, E, I, O, U, Y

The English alphabet consonants are: B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Z

Input

The single line contains a question represented by a non-empty line consisting of large and small Latin letters, spaces and a question mark. The line length does not exceed 100. It is guaranteed that the question mark occurs exactly once in the line — as the last symbol and that the line contains at least one letter.

Output

Print answer for the question in a single line: YES if the answer is "Yes", NO if the answer is "No".

Remember that in the reply to the question the last letter, not the last character counts. I. e. the spaces and the question mark do not count as letters.

Examples

Input

Is it a melon?

Output

NO

Input

Is it an apple?

Output

YES

Input

  Is     it a banana ?

Output

YES

Input

Is   it an apple  and a  banana   simultaneouSLY?

Output

YES
解题思路:简单判断一行中最后一个字母(非"?")是否为元音字母,如果是则输出"YES",否则输出"NO",水过!
AC代码:
 #include<bits/stdc++.h>
using namespace std;
const char obj[]={'a','A','e','E','i','I','o','O','u','U','y','Y'};
bool fb(char ch){
for(int i=;i<;++i)
if(ch==obj[i])return true;
return false;
}
int main(){
char s[];gets(s);
int len=strlen(s);
for(int i=len-;i>=;--i){
if((s[i]>='A'&&s[i]<='Z')||(s[i]>='a'&&s[i]<='z')){
if(fb(s[i]))cout<<"YES"<<endl;
else cout<<"NO"<<endl;
break;
}
}
return ;
}

B - Sleuth的更多相关文章

  1. 使用Spring Sleuth和Zipkin跟踪微服务

    随着微服务数量不断增长,需要跟踪一个请求从一个微服务到下一个微服务的传播过程, Spring Cloud Sleuth 正是解决这个问题,它在日志中引入唯一ID,以保证微服务调用之间的一致性,这样你就 ...

  2. 链接测试工具xenu link sleuth的使用

    链接测试工具xenu link sleuth的使用很简单. 可以从这里下载 http://home.snafu.de/tilman/xenulink.html 但是注意到: 如果需要登录才能进入所有的 ...

  3. SpringCloud学习笔记(7)——Sleuth

    Part VII. Spring Cloud Sleuth 46. Introduction Spring Cloud Sleuth为Spring Cloud实现了分布式的跟踪解决方案 46.1 Te ...

  4. springcloud(十二):使用Spring Cloud Sleuth和Zipkin进行分布式链路跟踪

    随着业务发展,系统拆分导致系统调用链路愈发复杂一个前端请求可能最终需要调用很多次后端服务才能完成,当整个请求变慢或不可用时,我们是无法得知该请求是由某个或某些后端服务引起的,这时就需要解决如何快读定位 ...

  5. SpringCloud学习之sleuth&zipkin【二】

    这篇文章我们解决上篇链路跟踪的遗留问题 一.将追踪数据存放到MySQL数据库中 默认情况下zipkin将收集到的数据存放在内存中(In-Memeroy),但是不可避免带来了几个问题: 在服务重新启动后 ...

  6. SpringCloud学习之sleuth&zipkin

    一.调用链跟踪的必要性 首先我们简单来看一下下单到支付的过程,别的不多说,在业务复杂的时候往往服务会一层接一层的调用,当某一服务环节出现响应缓慢时会影响整个服务的响应速度,由于业务调用层次很“深”,那 ...

  7. Spring Cloud(十二):分布式链路跟踪 Sleuth 与 Zipkin【Finchley 版】

    Spring Cloud(十二):分布式链路跟踪 Sleuth 与 Zipkin[Finchley 版]  发表于 2018-04-24 |  随着业务发展,系统拆分导致系统调用链路愈发复杂一个前端请 ...

  8. Spring Cloud Sleuth服务链路追踪(zipkin)(转)

    这篇文章主要讲述服务追踪组件zipkin,Spring Cloud Sleuth集成了zipkin组件. 一.简介 Spring Cloud Sleuth 主要功能就是在分布式系统中提供追踪解决方案, ...

  9. SpringCloud(7)服务链路追踪Spring Cloud Sleuth

    1.简介 Spring Cloud Sleuth 主要功能就是在分布式系统中提供追踪解决方案,并且兼容支持了 zipkin,你只需要在pom文件中引入相应的依赖即可.本文主要讲述服务追踪组件zipki ...

  10. 第八篇: 服务链路追踪(Spring Cloud Sleuth)

    一.简介 一个分布式系统由若干分布式服务构成,每一个请求会经过多个业务系统并留下足迹,但是这些分散的数据对于问题排查,或是流程优化都很有限.   要能做到追踪每个请求的完整链路调用,收集链路调用上每个 ...

随机推荐

  1. 2018年为什么要学习Python?Python还有前景吗?

    近年来,Python一直是当仁不让的开发入行首选,无论是职位数量.就业广度还是使用排行都远超其他语言,而且Python语言接近自然语言,学习起来非常的轻松简便,因此也越来越受到人们的欢迎.进入到201 ...

  2. ASP.NET Log4Net日志的配置及使用,文件写入

    Log4net是Apache log4j框架在Microsort.NET平台实现的框架. 帮助程序员将日志信息输出到各种目标(控制台,数据库,文件等) 1.新建一个ASP.NET项目 2.新建一个 l ...

  3. maven常用dos命令

    在平常的开发中可能会经常切换开发中的一些工具,有时就会对一些常用的命令给忘记了 这里特别记录下来方便以后使用: 1.查看maven版本:mvn -c 2.一件构建启动Tomcat:mvn tomcat ...

  4. Echarts特效散点图全解

    mytextStyle={ color:"#333", //文字颜色 fontStyle:"normal", //italic斜体 oblique倾斜 font ...

  5. Books Queries (codeforces 1066C)

    模拟题 开一个容器进行模拟即可,注意容器设置初始大小不然容易re.设置两个指针l,r.把容器当作桶,每一个桶都有一个编号表示位置,左边进入那么就是编号为l,右边一样.然后l--或者r++,l=r=0的 ...

  6. node.js开发环境配置

    node.js是什么 Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境.Node.js 使用了一个事件驱动.非阻塞式 I/O 的模型,使其轻量又高效.Node.j ...

  7. BZOJ 1634 洛谷2878 USACO 2007.Jan Protecting the flowers护花

    [题意] 约翰留下他的N只奶牛上山采木.他离开的时候,她们像往常一样悠闲地在草场里吃草.可是,当他回来的时候,他看到了一幕惨剧:牛们正躲在他的花园里,啃食着他心爱的美丽花朵!为了使接下来花朵的损失最小 ...

  8. Spring 源代码学习(一)

    一 .Spring容器最基本的功能 1. 读取配置文件 2. 校验配置文件的正确性 3. 将配置文件信息加载到内存 4. 通过反射实例化bean对象 5. 构建系统  二 .核心类关系图 图1-1 D ...

  9. Master Nginx(8) - Troubleshooting Techniques

    Analyzing log files Error log file formats Error log file entry examples Configuring advanced loggin ...

  10. noip模拟赛 第k大区间

    [问题描述] 定义一个长度为奇数的区间的值为其所包含的的元素的中位数. 现给出n个数,求将所有长度为奇数的区间的值排序后,第K大的值为多少. [输入] 输入文件名为kth.in. 第一行两个数n和k ...