CodeForces 645A Amity Assessment
2024-08-24 15:23:17
简单模拟。
#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 ;
}
最新文章
- 爬虫的入门以及scrapy
- SpringMVC 文件上传
- MVC5-6 帮助类
- UnicodeDecodeError: &#39;ascii&#39; codec can&#39;t decode byte 0xe5 in position 0: ordinal not in range(128)
- angularjs post
- ASP.NET MVC自定义AuthorizeAttribute篇知识点讲解—登录限制
- python的几个常用内置函数
- phpmyadmin导入导出大数据文件的办法
- SQLServer中临时表与表变量的区别分析
- 【转载】Android通过ksoap2调用.net(c#)的webservice
- Poj 1904 King&#39;s Quest 强连通分量
- DEDE里有个编码问题,不支持PHP5.4及以上版本!
- NDK Jni 开发(1)
- sudo 做不到的事
- SPOJ D-QUERY
- dubbo搭建
- Python_day1 Learning record
- 20175227张雪莹 2018-2019-2 《Java程序设计》第三周学习总结
- Linux学习指导
- 【Spark 深入学习-08】说说Spark分区原理及优化方法