Untitled
unknown
plain_text
3 years ago
475 B
3
Indexable
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; int main() { char a[4][4],flag = 1; for (int i = 0; i < 4; i++){ for (int j = 0; j < 4; j++){ cin >> a[i][j]; } } for (int i = 0; i < 3; i++){ for (int j = 0; j < 3; j++) { if (a[i][j] == a[i][j + 1] && a[i + 1][j] == a[i + 1][j + 1] && a[i][j] == a[i + 1][j]) { flag = 0; } } } if (flag) cout << "Yes"; else cout << "No"; }
Editor is loading...