#include #include #include using namespace std ; /* ifstream cin ("input") ; ofstream cout ("output") ; */ int main(int argc, char const *argv[]) { srand(time(NULL)) ; int n = 16 ; for (int i = 1 ; i <= 16 ; ++ i) { for (int j = 1 ; j <= 16 ; ++ j) { if ((i + j) % 2) { if (rand() % 17) cout << 1 << ' ' ; else cout << 2 << ' ' ; } else cout << 2 << ' ' ; } cout << '\n' ; } return 0; }