Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include <iostream>
#include <string>
using namespace std;
string arr[3];
int main() {
for(int i = 0; i < 3; i++) cin >> arr[i];
reverse(arr[2].begin(), arr[2].end());
if(arr[1][0] == arr[1][2] && arr[0] == arr[2]) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
Copy The Code &
Try With Live Editor
Input
XX.
...
.XX
...
.XX
Output
YES
Demonstration
Codeforcess Solution 12A. Super Agent C,C++, Java, Js and Python ,12A. Super Agent,Codeforcess Solution