这是一个水模拟,但是因为图片看不清,手打比较烧脑,我们错了好多次才过

#include<stdio.h>
#include<iostream>
#include<string.h>
#include<queue>
#include<algorithm>
using namespace std;
///0 Pock 1 Dcissors 2 Paper
int Judge(char *a,char *b)
{
if(!strcmp(a,"cs"))
{
if(!strcmp(b,"Kamen")) return ;
if(!strcmp(b,"Nuzky")) return ;
if(!strcmp(b,"Papir")) return ;
}
if(!strcmp(a,"en"))
{
if(!strcmp(b,"Rock")) return ;
if(!strcmp(b,"Scissors")) return ;
if(!strcmp(b,"Paper")) return ;
}
if(!strcmp(a,"fr"))
{
if(!strcmp(b,"Pierre")) return ;
if(!strcmp(b,"Ciseaux")) return ;
if(!strcmp(b,"Feuille")) return ;
}
if(!strcmp(a,"de"))
{
if(!strcmp(b,"Stein")) return ;
if(!strcmp(b,"Schere")) return ;
if(!strcmp(b,"Papier")) return ;
}
if(!strcmp(a,"hu"))
{
if(!strcmp(b,"Ko") || !strcmp(b,"Koe")) return ;
if(!strcmp(b,"Ollo") || !strcmp(b,"Olloo")) return ;
if(!strcmp(b,"Papir")) return ;
}
if(!strcmp(a,"it"))
{
if(!strcmp(b,"Sasso") || !strcmp(b,"Roccia")) return ;
if(!strcmp(b,"Forbice")) return ;
if(!strcmp(b,"Carta") || !strcmp(b,"Rete")) return ;
}
if(!strcmp(a,"jp"))
{
if(!strcmp(b,"Guu")) return ;
if(!strcmp(b,"Choki")) return ;
if(!strcmp(b,"Paa")) return ;
}
if(!strcmp(a,"pl"))
{
if(!strcmp(b,"Kamien")) return ;
if(!strcmp(b,"Nozyce")) return ;
if(!strcmp(b,"Papier")) return ;
}
if(!strcmp(a,"es"))
{
if(!strcmp(b,"Piedra")) return ;
if(!strcmp(b,"Tijera")) return ;
if(!strcmp(b,"Papel")) return ;
}
}
int main()
{
char cou1[],cou2[],p1[],p2[];
bool flag = true;
int ca = ;
while(~scanf("%s%s%s%s",cou1,p1,cou2,p2))
{
char op1[],op2[];
int tot1 = ,tot2 = ;
while(~scanf("%s",op1))
{
if(op1[] == '-' || op1[] == '.')
{
printf("Game #%d:\n",++ca);
if(tot1 == )
printf("%s: %d point\n",p1,tot1);
else printf("%s: %d points\n",p1,tot1);
if(tot2 == )
printf("%s: %d point\n",p2,tot2);
else printf("%s: %d points\n",p2,tot2);
if(tot1 > tot2) printf("WINNER: %s\n",p1);
else if(tot1 < tot2) printf("WINNER: %s\n",p2);
else puts("TIED GAME");
puts("");
if(op1[] == '.')flag = false;
break;
}
scanf("%s",op2);
int re1 = Judge(cou1,op1);
int re2 = Judge(cou2,op2);
/// cout<<"re1 = "<<re1<<endl;
/// cout<<"re2 = "<<re2<<endl;
if(re1 == re2) continue;
if(re1 == && re2 == ) tot1++;
else if(re1 == && re2 == ) tot1++;
else if(re1 == && re2 == ) tot1++;
else tot2++;
}
if(!flag) break;
}
return ;
}

BNUOJ 6038 - Reaux! Sham! Beaux!(模拟)的更多相关文章

  1. bnuoj 29373 Key Logger(模拟双向队列)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=29373 [题意]:模拟光标输入 [题解]:用双向列表模拟实现,这里用其他模拟会超时,注意内存的释放 ...

  2. bnuoj 20838 Item-Based Recommendation (模拟)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=20838 [题意]: 有点长,略. [code]: #include <iostream> ...

  3. HOJ题目分类

    各种杂题,水题,模拟,包括简单数论. 1001 A+B 1002 A+B+C 1009 Fat Cat 1010 The Angle 1011 Unix ls 1012 Decoding Task 1 ...

  4. bnuoj 4207 台风(模拟题)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=4207 [题意]:中文题,略 [题解]:模拟 [code]: #include <iostrea ...

  5. bnuoj 20832 Calculating Yuan Fen(暴力模拟)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832 [题意]: 给你一串字符串,求一个ST(0<ST<=10000),对字符串中字符 ...

  6. bnuoj 33648 Neurotic Network(树形模拟题)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=33648 [题解]:结果先对MOD*2取模,才能得到结果是否是正确的奇偶问题,得到最后结果之后再对MO ...

  7. bnuoj 1057 函数(模拟)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=1057 [题意]:给定x的值,带入f(x)求函数值 [题解]:注意第一个数的符号可能是'+',这里把我 ...

  8. bnuoj 27987 Record of the Attack at the Orbit (模拟)

    http://www.bnuoj.com/bnuoj/problem_show.php?pid=27987 [题意]:给定坐标输出图形 [题解]:处理坐标上的小技巧 [code]: #include ...

  9. bnuoj 31796 键盘上的蚂蚁(搜索模拟)

    http://www.bnuoj.com/bnuoj/contest_show.php?cid=2876#problem/31796 [题意]: 如题,注意大小写情况 [code]: #include ...

随机推荐

  1. VBS脚本操作网页元素

    =================打开百度,点击百度按钮==================== Dim btn,ieSet ie = WScript.CreateObject("Inter ...

  2. git基本命令--远程

    git clone: # clone到 <本地目录名> $ git clone <版本库的网址> <本地目录名> # 克隆版本库的时候,所使用的远程主机自动被Git ...

  3. Django:之Sitemap站点地图、通用视图和上下文渲染器

    Django中自带了sitemap框架,用来生成xml文件 Django sitemap演示: sitemap很重要,可以用来通知搜索引擎页面的地址,页面的重要性,帮助站点得到比较好的收录. 开启si ...

  4. ECOS运行环境安装(一)

    ECOS为上海商派公司研发的PHP电商框架.详情见 http://www.ec-os.net/doc.html 本文介绍CentOS6.x 64位下安装ECOS1.2运行环境的具体步骤: 1)需要准备 ...

  5. Centos7下安装pip

    Linux 通过 pip 安装使用 Shadowsocks - CentOS 7 (06) Pip是安装Python包的工具,提供了安装.列举已安装包.升级以及卸载包的功能.Pip 是对easy_in ...

  6. UIImageView的UserInteractionEnabled什么时候为no

    UIImageView作为背景,但直接把按钮或者UITextField放在上面无法相应事件 特殊子类的覆盖 userInteractionEnabled属性默认值为YES,但UIView的一些子类中对 ...

  7. iPhone5s 等 64位真机 运行 带有百度地图等 仅支持32位系统API和SDK的问题

    将下图中画红色框的部分去掉,程序就不再支持64位了.iPhone5s 将使用它的32位兼容模式.(而不再是64位模式)百度地图也不会报错了.

  8. Echarts自适应浏览器大小

    var myChart = echarts.init(document.getElementById('sitesChar')); var option = { title : { text: 'No ...

  9. Tree Restoring

    Tree Restoring Time limit : 2sec / Memory limit : 256MB Score : 700 points Problem Statement Aoki lo ...

  10. A convenient way of installing(compiling) VIM with YCM

    Ah, while I am still downloading LLVM from github(very slow.. and very large in size). I come with m ...