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 ...
随机推荐
- 求最短路径算法之SPAF算法。
关于求最短路径: 求最短路径的算法有许多种,除了排序外,恐怕是OI界中解决同一类问题算法最多的了.最熟悉的无疑是Dijkstra(不能求又负权边的图),接着是Bellman-Ford,它们都可以求出由 ...
- 大约ActionContext.getContext()使用体验
这是我在另一个人的博客看了,原来博客的时间长一点.我把它简化了一下,运营商,以方便它看起来. 为了避免与Servlet API耦合在一起,方便Action类做单元測试,Struts 2对HttpSer ...
- 【工作笔记三】非常全面的讲解Hosts文件
原文:http://www.cnblogs.com/zgx/archive/2009/03/10/1408017.html 很奇怪有很多人不知道Hosts是什么东西.在网络病毒日渐盛行的今天,认识Ho ...
- ASP.NET请求处理过程
当请求一个*.aspx文件的时候,这个请求会被inetinfo.exe进程截获,它判断文件的后缀(aspx)之后,将这个请求转交给Aspnet_isapi.dll,aspnet_isapi.dll会通 ...
- oledb快速导入Excel案例
DataTable dtImportExcel = null; string pathFile = Server.MapPath("~/ErrorCatory.xlsx"); // ...
- gradle测试与线上打包
首先,第一反应理所当然的是profile : <?xml version="1.0" encoding="UTF-8"?> <beans xm ...
- java 权限 部分截图
下载地址:http://download.csdn.net/detail/heyehuang/5857263
- c#中queue的用法
Queue队列就是先进先出.它并没有实现 IList,ICollection.所以它不能按索引访问元素,不能使用Add和Remove.下面是 Queue的一些方法和属性 Enqueue():在队列的末 ...
- 初探performance.timing API
初探performance.timing API 浏览器新提供的performance接口精确的告诉我们当访问一个网站页面时当前网页每个处理阶段的精确时间(timestamp),以方便我们进行前端 ...
- [译]反-反汇编 & 混淆 #1: 苹果没有遵循自己制定的Mach-O规范?
原文地址:http://reverse.put.as/2012/02/02/anti-disassembly-obfuscation-1-apple-doesnt-follow-their-own-m ...