Aaah!

Photo by Unknown

Jon Marius shouted too much at the recent Justin Bieber concert, and now needs to go to the doctor because of his sore throat. The doctor’s instructions are to say “aaah”. Unfortunately, the doctors sometimes need Jon Marius to say “aaah” for a while, which Jon Marius has never been good at. Each doctor requires a certain level of “aah” – some require “aaaaaah”, while others can actually diagnose his throat with just an “h”. (They often diagnose wrongly, but that is beyond the scope of this problem.) Since Jon Marius does not want to go to a doctor and have his time wasted, he wants to compare how long he manages to hold the “aaah” with the doctor’s requirements. (After all, who wants to be all like “aaah” when the doctor wants you to go “aaaaaah”?)

Each day Jon Marius calls up a different doctor and asks them how long his “aaah” has to be. Find out if Jon Marius would waste his time going to the given doctor.

Input

The input consists of two lines. The first line is the “aaah” Jon Marius is able to say that day. The second line is the “aah” the doctor wants to hear. Only lowercase ’a’ and ’h’ will be used in the input, and each line will contain between 00 and 999999 ’a’s, inclusive, followed by a single ’h’.

Output

Output “go” if Jon Marius can go to that doctor, and output “no” otherwise.

Sample Input 1 Sample Output 1
aaah
aaaaah
no
Sample Input 2 Sample Output 2
aaah
ah
go

题意

判断那人要不要去看医生,如果前面的字符串比后面的短,证明不用,否则就用

思路

比较字符串长度

代码

#include<bits/stdc++.h>
using namespace std;
char a1[],a2[];
int main() {
while (~scanf("%s %s", a1,a2))
{
puts(strlen(a1) < strlen(a2) ? "no" : "go");
}
return ;
}

Kattis - Aaah!的更多相关文章

  1. It's a Mod, Mod, Mod, Mod World Kattis - itsamodmodmodmodworld (等差数列求和取模)

    题目链接: D - It's a Mod, Mod, Mod, Mod World Kattis - itsamodmodmodmodworld 具体的每个参数的代表什么直接看题面就好了. AC代码: ...

  2. A - Piece of Cake Kattis - pieceofcake (数学)

    题目链接: A - Piece of Cake Kattis - pieceofcake 题目大意:给你一个多边形,然后给你这个多边形的每个点的坐标,让你从这个n个点中选出k个点,问这个k个点形成的面 ...

  3. Subsequences in Substrings Kattis - subsequencesinsubstrings (暴力)

    题目链接: Subsequences in Substrings Kattis - subsequencesinsubstrings 题目大意:给你字符串s和t.然后让你在s的所有连续子串中,找出这些 ...

  4. G - Intersecting Rectangles Kattis - intersectingrectangles (扫描线)(判断多个矩形相交)

    题目链接: G - Intersecting Rectangles Kattis - intersectingrectangles 题目大意:给你n个矩形,每一个矩形给你这个矩形的左下角的坐标和右上角 ...

  5. E - Emptying the Baltic Kattis - emptyingbaltic (dijkstra堆优化)

    题目链接: E - Emptying the Baltic Kattis - emptyingbaltic 题目大意:n*m的地图, 每个格子有一个海拔高度, 当海拔<0的时候有水. 现在在(x ...

  6. G - Galactic Collegiate Programming Contest Kattis - gcpc (set使用)

    题目链接: G - Galactic Collegiate Programming Contest Kattis - gcpc 题目大意:当前有n个人,一共有m次提交记录,每一次的提交包括两个数,st ...

  7. Kattis - virus【字符串】

    Kattis - virus[字符串] 题意 有一个正常的DNA序列,然后被病毒破坏.病毒可以植入一段DNA序列,这段插入DNA序列是可以删除正常DNA序列中的一个连续片段的. 简单来说就是,给你一段 ...

  8. Kattis - bank 【简单DP】

    Kattis - bank [简单DP] Description Oliver is a manager of a bank near KTH and wants to close soon. The ...

  9. City Destruction Kattis - city dp

    /** 题目:City Destruction Kattis - city 链接:https://vjudge.net/problem/Kattis-city 题意:有n个怪兽,排成一行.每个怪兽有一 ...

随机推荐

  1. StringTokenizer使用类

    StringTokenizer它被用来分离String应用类别.当量VB的split功能. 1.构造函数 public StringTokenizer(String str) public Strin ...

  2. Windows 下安装 Oracle 12c 教程

    原文 Windows 下安装 Oracle 12c 教程 申明:本文原作者:Jmq   本文给大家带来的是 Oracle 12C 的安装教程. 1.准备 1.1 下载 Oracle 12c 安装程序 ...

  3. 处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”

    HTTP 错误 404.3 - Not Found 由于扩展配置问题而无法提供您请求的页面.如果该页面是脚本,请添加处理程序.如果应下载文件,请添加 MIME 映射. 解决办法:以管理员运行命令:C: ...

  4. sql 行转列 PIVOT 列转行 UNPIVOT

    原文:sql 行转列 PIVOT 列转行 UNPIVOT 一: 现有表一(t_table1),想转为表二(t_table2)的格式. 表一: 年 公司 收入 2013 公司1 12 2013 公司2 ...

  5. Windows下MYSQL自动备份批处理

    windows下MYSQL自动备份批处理 2011-05-04 09:16:45|  分类: mysql|举报|字号 订阅     按系统时间进行备份 注意mysql安装路径中如果有空格.就要把,.b ...

  6. QTP脚本不能录制怎么办?

    QTP是基于VBS脚本语言的,大部分VBS脚本都能在QTP上运行,只是在一些细节上略有不同,比如说VBS上停止用sleep,QTP上用wait.QTP的强大之处在于对程序窗口的操作,有很多针对窗体的属 ...

  7. 远程连接mysql速度慢的解决方法

    最近在公司内部连mysql速度非常慢,一直还以为公司的网络有问题,后经查发现出现这种问题的主要原因是mysql默认开启了DNS的反向解析功能,连接时反向解析计算机名称时耗时严重,导致连接超慢.解决方法 ...

  8. .NET MVC4 实训记录之七(实现资源的自主访问后续)

    我们在上一篇中讨论了如何利用ModelMetadata实现国际化资源文件访问,但也留下了一些问题,即:如何利用ModelMetadata实现相同类型的属性信息的个性化资源显示.本人没有找到合适的方案, ...

  9. HAProxy+apache实现web服务动静分离

    HAProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支持虚拟主机,它是免费.快速并且可靠的一种解决方案. HAProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支 ...

  10. CentOS 6.4源码编译安装httpd并启动测试

    今天来总结一下在Linux中软件安装,通常我们应该知道,安装软件有两种方法:一种是软件包的安装,也就是rpm包的安装,就是指这些软件包都是 已经编译好的二进制rpm包,我们通过rpm安装工具和yum安 ...