Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7161 - Төвийн тэгшхэм

3x3 хүснэгтийн нүд бүр x ба . тэмдэгтүүдийн аль нэг нь байна. Голын нүдний хувьд тэгш хэмтэй эсэхийг шалгана уу.

Input

x ба . тэмдэгтээс бүрдсэн 3×3 хүснэгт.

Output

Тэгш хэмтэй бол YES, үгүй бол NO гэж хэвлэ.

Example

Input 1:

XX.
...
.XX

Output 1:

YES

Input 2:

X.X
X..
...

Output 2:

NO


Нэмсэн:Bataa
Огноо:2014-02-27
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE
Эх сурвалж:Сodeforces

hide comments
2024-11-20 01:10:17


Last edit: 2024-11-20 01:16:02
2024-11-13 02:14:46
#include <iostream>
using namespace std;
int main(){

string a , b , c;

cin >> a >> b >> c;

string x_change_pos = a;

x_change_pos[2] = x_change_pos[0];
x_change_pos[0] = a[2];
if(x_change_pos == c && b[0] == b[1] && b[1] == b[2]) cout << "YES";
else{
string y1 = a , y3 = c , y2 = b;
y1[0] = y3[0];
y3[0] = a[0];
if(y1[0] == a[2] && y3[0] == c[2] && y2[0] == y2[2]) cout << "YES";
else cout << "NO";
}

return 0;
} deli huul suga
2024-01-21 04:42:00
#include<bits/stdc++.h>
2024-01-21 04:41:26
using namespace std;
2024-01-21 04:41:14
int main(){
2024-01-21 04:41:00
string a,b,c;
2024-01-21 04:40:47
cin>>a>>b>>c;
2024-01-21 04:40:34
if(a[0]==c[2] && a[1]==c[1] && a[2]==c[0] && b[0]==b[2]) cout<<"YES"<<endl;
2024-01-21 04:40:08
else cout<<"NO"<<endl;
2024-01-21 04:39:58

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.