CodeForces 645A Amity Assessment

时间:2021-11-10 01:33:37

简单模拟。

#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 ;
}