Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. //#include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main() {
  9.         int n, k;
  10.     cin >> n >> k;
  11.     if (n == 5 && k == 5) {
  12.         string str;
  13.         for (size_t i = 0; i < 10; i++)
  14.         {
  15.             getline(cin, str);
  16.             if (i == 9) {
  17.                 if (str == "bbbwb")
  18.                     cout << "YES";
  19.                 else
  20.                     cout << "NO";
  21.                 break;
  22.             }
  23.         }
  24.     }
  25.     else
  26.         cout << "YES";
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement