CodeForces 645A Amity Assessment
简单模拟。
#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的更多相关文章
- Codeforces 645A Amity Assessment【八数码】
题目链接: http://codeforces.com/problemset/problem/645/A 题意: 2*2的八数码问题 分析: 这题n为2,不需要搜索,直接判断字母排列顺序就好了. 注意 ...
- Code Forces 645A Amity Assessment
A. Amity Assessment time limit per test2 seconds memory limit per test256 megabytes inputstandard in ...
- codeforces 655A A. Amity Assessment(水题)
题目链接: A. Amity Assessment time limit per test 2 seconds memory limit per test 256 megabytes input st ...
- 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 ...
- 第六周周赛——AK机会不易得,好好把握题解(出自HDU5650,codeforces 616A,624A,659A,655A,658A)
A题: A题题目链接 题目描写叙述: 位运算 TimeLimit:1000MS MemoryLimit:65536KB 64-bit integer IO format:%I64d Problem ...
- python爬虫学习(5) —— 扒一下codeforces题面
上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...
- 【Codeforces 738D】Sea Battle(贪心)
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...
- 【Codeforces 738C】Road to Cinema
http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...
- 【Codeforces 738A】Interview with Oleg
http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...
随机推荐
- How To : Create SQL Server Management Studio Addin
原文 How To : Create SQL Server Management Studio Addin Read the full and original article from Jon Sa ...
- hibernate在持久对象的生命周期(三州:自由状态,持久状态,自由状态 之间的转换)
三种状态的基本概念: 1. 临时身份(Transient):也被称为自由状态,它只存在于内存中,并且在数据库中没有相应的数据. 使用new创建的对象,久化,没有处于Session中,处于此状态的对象 ...
- 【转】删除修改Eclipse里的SVN账户
转自http://msongli.iteye.com/blog/1186648 引自: http://wanghongxu.iteye.com/blog/539806 http://jxdwuao.i ...
- jsp解决kindeditor在线编辑器struts图片上传问题
1.下载 官网下载ckeditor,解压后去掉不需要的部分,仅需保留plugin,lang,theme文件夹,这三个文件夹中用不到的东西可以删除, 比如lang文件下存放所有语言文件js,仅仅 保留e ...
- UrlRouting的理解
UrlRouting的理解 文章内容 根据对Http Runtime和Http Pipeline的分析,我们知道一个ASP.NET应用程序可以有多个HttpModuel,但是只能有一个HttpHand ...
- CLR中的垃圾回收机制
CLR中采用代(generation)来作为其垃圾回收的一种机制,其唯一的目的是提升程序的性能.基予代的垃圾回收器有以下假设: ·对象越新,其生存周期越短. ·对象越老,其生存周期越长. ·回收堆的一 ...
- [Usaco2008 Nov]Buying Hay 购买干草[背包]
Description 约翰的干草库存已经告罄,他打算为奶牛们采购日(1≤日≤50000)磅干草. 他知道N(1≤N≤100)个干草公司,现在用1到N给它们编号.第i个公司卖的干草包重 ...
- Real-Rime Rendering (1) - 渲染管线(Rendering Pipeline)
提要 渲染管线是实时渲染中最重要的部分,它的最主要的任务就是在给定一个虚拟的场景,包括相机,object,灯光,纹理等等,生成一副2D的图像. 最基础的渲染管线如下图所示: 主要的阶段包括三个:App ...
- VMware上安装ubuntu 13.04
作者:viczzx 出处:http://www.cnblogs.com/zixuan-zhang 欢迎转载,也请保留这段声明.谢谢! 这两天打算在Linux环境下学Python语言,想换个高点的ubu ...
- jQuery event的复制粘贴的坑
jQuery为了兼容性会把系统暴露出来的event重新整理一遍,但是复制粘贴的event就被丢掉了. 所以要在所有原生浏览器想实现复制粘贴,大家都用flash实现了.其实只要用原生的方法捕获事件就ok ...