#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. Eclipse 中,web项目在Tomcat运行时填写不了Server name

    最近开发项目,从MyEclipse中导入项目到Eclipse中,那些WEB属性都在,可就是不能在Tomcat上运行.纠结一番,最后发现是这个问题: WEB的版本问题. 具体问题看下图: 解决方案: W ...

  2. 用PopWindow做下拉框

    最近在做下拉框,本来想用spinner,可是spinner达不到项目要求,跟同学同事问了一圈,都在用popwindow, 网上看了一下,popwindow挺简单的,可定制性挺强的,符合我的要求,所以, ...

  3. VS2010下调试.NET源码

    微软走向开源,是时候用vs去单步调试进入源码了.参考地址:http://blog.csdn.net/waxgourd0/article/details/6600182 可供参考的文章:https:// ...

  4. CSS3中盒子的box-sizing属性

    box-sizing 属性 box-sizing 属性用来改变默认的 CSS盒模型 对元素宽高的计算方式.这个属性可以用于模拟那些非正确支持标准盒模型的浏览器的表现. box-sizing:conte ...

  5. 【IE6的疯狂之十三】IE6下使用滤镜后链接不能点击的BUG

    大家可能都知道IE6下使用DXImageTransform.Microsoft.AlphaImageLoader滤镜(用于PNG32 Alpha透明)后链接不能点击的BUG,大家也都知道只要在a标签上 ...

  6. HDU 5869 Different GCD Subarray Query

    离线操作,树状数组,$RMQ$. 这个题的本质和$HDU$ $3333$是一样的,$HDU$ $3333$要求计算区间内不同的数字有几个. 这题稍微变了一下,相当于原来扫描到$i$的之后是更新$a[i ...

  7. CodeForces 711A Bus to Udayland

    简单题. #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #inclu ...

  8. USACO 3.2 Factorials

    Factorials The factorial of an integer N, written N!, is the product of all the integers from 1 thro ...

  9. iOS UIImageView自适应图片大小

    窗口大小获取: CGRect screenBounds = [ [UIScreenmainScreen]bounds];//返回的是带有状态栏的Rect CGRect rect = [ [UIScre ...

  10. 第一百二十四节,JavaScriptCookie与存储

    JavaScriptCookie与存储 学习要点: 1.cookie 2.cookie局限性 3.其他存储 随着Web越来越复杂,开发者急切的需要能够本地化存储的脚本功能.这个时候,第一个出现的方案: ...