#include<cstdio>
char s1[],s2[]; int num[];
int jg[];
int bz; int main()
{
int n,i;
while(~scanf("%d",&n))
{
int tot=;
if(n==) break;
scanf("%s%s",s1,s2);
if(s1[]=='r')
{
printf("Stan may be honest\n");
continue;
}
else if(s1[]=='t')
{
if(s2[]=='h')//高了
{
num[tot]=n;
jg[tot]=;//1表示高了
tot++;
}
else if(s2[]=='l')//低了
{
num[tot]=n;
jg[tot]=;//0表示低了
tot++;
}
}
while()
{
scanf("%d",&n);
scanf("%s%s",s1,s2);
if(s1[]=='r')
{
bz=n;
break;
}
else if(s1[]=='t')
{
if(s2[]=='h')//高了
{
num[tot]=n;
jg[tot]=;//1表示高了
tot++;
}
else if(s2[]=='l')//低了
{
num[tot]=n;
jg[tot]=;//0表示低了
tot++;
}
}
}
for(i=;i<tot;i++)
{
if((num[i]>bz&&jg[i]==)||(num[i]<bz&&jg[i]==)) continue;
else break;
}
if(i==tot) printf("Stan may be honest\n");
else printf("Stan is dishonest\n");
} return ;
}

ZOJ 1926 Guessing Game的更多相关文章

  1. ZOJ题目分类

    ZOJ题目分类初学者题: 1001 1037 1048 1049 1051 1067 1115 1151 1201 1205 1216 1240 1241 1242 1251 1292 1331 13 ...

  2. ZOJ People Counting

    第十三届浙江省大学生程序设计竞赛 I 题, 一道模拟题. ZOJ  3944http://www.icpc.moe/onlinejudge/showProblem.do?problemCode=394 ...

  3. ZOJ 3686 A Simple Tree Problem

    A Simple Tree Problem Time Limit: 3 Seconds      Memory Limit: 65536 KB Given a rooted tree, each no ...

  4. 2632: [neerc2011]Gcd guessing game

    2632: [neerc2011]Gcd guessing game Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 144  Solved: 84[S ...

  5. ZOJ Problem Set - 1394 Polar Explorer

    这道题目还是简单的,但是自己WA了好几次,总结下: 1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结 题目要求 ...

  6. ZOJ Problem Set - 1392 The Hardest Problem Ever

    放了一个长长的暑假,可能是这辈子最后一个这么长的暑假了吧,呵呵...今天来实验室了,先找了zoj上面简单的题目练练手直接贴代码了,不解释,就是一道简单的密文转换问题: #include <std ...

  7. ZOJ Problem Set - 1049 I Think I Need a Houseboat

    这道题目说白了是一道平面几何的数学问题,重在理解题目的意思: 题目说,弗雷德想买地盖房养老,但是土地每年会被密西西比河淹掉一部分,而且经调查是以半圆形的方式淹没的,每年淹没50平方英里,以初始水岸线为 ...

  8. ZOJ Problem Set - 1006 Do the Untwist

    今天在ZOJ上做了道很简单的题目是关于加密解密问题的,此题的关键点就在于求余的逆运算: 比如假设都是正整数 A=(B-C)%D 则 B - C = D*n + A 其中 A < D 移项 B = ...

  9. ZOJ Problem Set - 1001 A + B Problem

    ZOJ ACM题集,编译环境VC6.0 #include <stdio.h> int main() { int a,b; while(scanf("%d%d",& ...

随机推荐

  1. webStorm支持.wxml文件高亮显示

    微信小程序官方说明需要在微信开发者工具中开发运行,但这个工具着实不咋地. 我是使用webstrom编辑,然后在微信开发者工具中热加载查看效果,因为webstrom默认并不支持*.wxml,添加使用xm ...

  2. trove datastore 浅析

    以下代码来自trove/datastore该目录下一共有4个文件__init__,views,models,service大概关系(主要是wsgi吧,没仔细学过,简单的从代码上做推测),service ...

  3. Java学习笔记-File

    //文件操作 //2015年4月30日15:40:21 package com.alfredsun.first.main; import java.io.File; import java.io.IO ...

  4. js控制键盘按键(回车、空格)

    <script type="text/javascript">  $(function(){         $(document).keypress(function ...

  5. LeetCode 476. Number Complement

    Given a positive integer, output its complement number. The complement strategy is to flip the bits ...

  6. [转]numpy线性代数基础 - Python和MATLAB矩阵处理的不同

    转自:http://blog.csdn.net/pipisorry/article/details/45563695 http://blog.csdn.net/pipisorry/article/de ...

  7. 循序渐进看Java web日志跟踪(2)-Java日志API认识

    接触过Java的朋友应该都会知道,java的开源框架百花齐放,实现同样的功能,总能找到几个强大的开源框架来进行选择.在日志方面,Java同样不逊色.除了JDK本身自带的简单的日志工具,java还有如l ...

  8. 使用Jax-rs 开发RESTfull API 入门

    使用Jax-rs 开发RESTfull API 入门 本文使用 Jersey 2开发RESTfull API.Jersey 2 是 JAX-RS 接口的参考实现 使用到的工具 Eclipse Neon ...

  9. XTU 1246 Heartstone

    $2016$长城信息杯中国大学生程序设计竞赛中南邀请赛$D$题 贪心. 我是这样贪的:开三个优先队列$q[0]$,$q[1]$,$q[2]$,$q[i]$存储对$3$取余之后为$i$的数. 首先看看还 ...

  10. USACO 3.2 Stringsobits

    StringsobitsKim Schrijvers Consider an ordered set S of strings of N (1 <= N <= 31) bits. Bits ...