简单模拟。

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0),eps=1e-;
void File()
{
freopen("D:\\in.txt","r",stdin);
freopen("D:\\out.txt","w",stdout);
}
template <class T>
inline void read(T &x)
{
char c=getchar(); x=;
while(!isdigit(c)) c=getchar();
while(isdigit(c)) {x=x*+c-''; c=getchar();}
} char s[][],t[][]; bool check()
{
if(s[][]!=t[][]) return ;
if(s[][]!=t[][]) return ;
if(s[][]!=t[][]) return ;
if(s[][]!=t[][]) return ;
return ;
} void f()
{
if(s[][]=='X') { swap(s[][],s[][]); return; }
if(s[][]=='X') { swap(s[][],s[][]); return; }
if(s[][]=='X') { swap(s[][],s[][]); return; }
if(s[][]=='X') { swap(s[][],s[][]); return; }
} int main()
{
scanf("%s",s[]);
scanf("%s",s[]);
scanf("%s",t[]);
scanf("%s",t[]); for(int i=;i<=;i++)
{
if(check()) { printf("YES\n"); return ; }
f();
} printf("NO\n");
return ;
}

CodeForces 645A Amity Assessment的更多相关文章

  1. Codeforces 645A Amity Assessment【八数码】

    题目链接: http://codeforces.com/problemset/problem/645/A 题意: 2*2的八数码问题 分析: 这题n为2,不需要搜索,直接判断字母排列顺序就好了. 注意 ...

  2. Code Forces 645A Amity Assessment

    A. Amity Assessment time limit per test2 seconds memory limit per test256 megabytes inputstandard in ...

  3. codeforces 655A A. Amity Assessment(水题)

    题目链接: A. Amity Assessment time limit per test 2 seconds memory limit per test 256 megabytes input st ...

  4. CROC 2016 - Elimination Round (Rated Unofficial Edition) A. Amity Assessment 水题

    A. Amity Assessment 题目连接: http://www.codeforces.com/contest/655/problem/A Description Bessie the cow ...

  5. 第六周周赛——AK机会不易得,好好把握题解(出自HDU5650,codeforces 616A,624A,659A,655A,658A)

    A题: A题题目链接 题目描写叙述: 位运算 TimeLimit:1000MS  MemoryLimit:65536KB 64-bit integer IO format:%I64d Problem ...

  6. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  7. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

  8. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

  9. 【Codeforces 738A】Interview with Oleg

    http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...

随机推荐

  1. fullCalendar:中文API

    1.与google日历连接,别忘记加入<script type='text/javascript' src='js/gcal.js'/> events: $.fullCalendar.gc ...

  2. Hibernate的三种缓存

    一级缓存 hibernate的一级缓存是跟session绑定的,那么一级缓存的生命周期与session的生命周期一致,因此,一级缓存也叫session级缓存或者事务级缓存. 支持一级缓存的方法有: q ...

  3. java class load

    https://mp.weixin.qq.com/s?__biz=MjM5NzMyMjAwMA==&mid=403638649&idx=2&sn=4f17e8b58c64875 ...

  4. r.js实践

    r.js合并实践 项目中用到require.js做生产时模块开发,但上线要合并压缩,幸好它配套有r.js.下面就其用法说明一下. 首先建一个目录,里面的结构如下: require.js可以到r.js项 ...

  5. Dynamics CRM 警惕Odata查询的陷阱

    Dynamics CRM可以很方便的通过用Odata通过AJAX查询到数据.查询分为两种:精确查找和模糊查找. 精确查找是指通过GUID匹配得到一条数据,如: http://CRMURL/org/XR ...

  6. Jumony Core 3,真正的HTML引擎

    Jumony Core 3,真正的HTML引擎,正式版发布 2013-11-28 17:22 by Ivony..., 778 阅读, 18 评论, 收藏, 编辑 Jumony是一个开源项目,已经有三 ...

  7. ASP.NET MVC实现剪切板功能

    前言 关于复制粘贴的功能,好像不用劳师动众的写后端代码,JS就可以,但正如大家所知道的,兼容性问题,当然这么通用的功能怎么可能没有一个通用的方案呢,于是便找到了一款jquery插件 jquery.cl ...

  8. DOS头分析

    DOS头分析 PE文件结构综览: 首先上图片: 看到上面的图片可以清晰的看到PE结构复杂结构式什么样子的.有DOS首部,PE头部,PE节表,很多的表块,最后就是一些调试信息. DOS头由DOS 'MZ ...

  9. java遍历Set集合

    class Person{ private String name; private int age; public Person(String name,int age){ this.name = ...

  10. linux学习心得之vim/Cvim篇

    linux学习心得之vim/Cvim篇 在linux 下,vim 时一种最常见的编辑器,很多linux的发行版就自带了.我的是CentOS 6.3. 基本上Vim共分为3种模式,分别是一般模式,编辑模 ...