1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <iomanip>
#include <cassert>
#include <map>
#include <set>


const int ROZMIAR = 4;

bool getZapalony(unsigned long long number, int x, int y)
{
  int pozycja = x * ROZMIAR + y;
  return (number & (1ull << pozycja)) > 0;
}

unsigned long long setZapalony(unsigned long long number, int x, int y, bool zapalony)
{
  int pozycja = x * ROZMIAR + y;
  if (zapalony)
    return (number | (1ull << pozycja));
  else
    return (number & (~(1ull << pozycja)));
}

void print(unsigned long long number)
{
  for (int x = 0; x < ROZMIAR; ++x)
  {
    for (int y = 0; y < ROZMIAR ; ++y)
    {
      if (getZapalony(number, x, y))
        std::cout << "X";
      else
        std::cout << "o";
    }
    std::cout << "\n";
  }
}

int main()
{
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);

  std::cout << "1";
  for (int i=1; i<100; ++i)
    std::cout << "0";
  std::cout << "\n";
  for(int j=0; j<98; ++j)
  {
    for (int i = 0; i < 50; ++i)
      std::cout << "01";
    std::cout << "\n";
  }
  std::cout << "0";
  for (int i = 1; i < 100; ++i)
    std::cout << "1";
  std::cout << "\n";
  return 0;


  int maxWynik = 0;
  for (unsigned long long  i = 0; i < (1ull << (ROZMIAR * ROZMIAR)); ++i)
  {
    unsigned long long stanPoczatkowy = i;
    std::set<unsigned long long> stanyOsiagalne;
    unsigned long long stan = stanPoczatkowy;
    for (int j = 0; j < 40; ++j)
    {
      stanyOsiagalne.insert(stan);
      unsigned long long nowyStan = stan;
      unsigned long long zmiany = 0;
      for (int x = 0; x < ROZMIAR-1; ++x)
      {
        for (int y = 0; y < ROZMIAR-1; ++y)
        {
          if (getZapalony(stan, x, y) && getZapalony(stan, x + 1, y + 1) && !getZapalony(stan, x + 1, y) && !getZapalony(stan, x, y + 1))
          {
            zmiany = setZapalony(zmiany, x, y, true);
            zmiany = setZapalony(zmiany, x, y+1, true);
            zmiany = setZapalony(zmiany, x+1, y, true);
            zmiany = setZapalony(zmiany, x+1, y+1, true);
          }
          if (!getZapalony(stan, x, y) && !getZapalony(stan, x + 1, y + 1) && getZapalony(stan, x + 1, y) && getZapalony(stan, x, y + 1))
          {
            zmiany = setZapalony(zmiany, x, y, true);
            zmiany = setZapalony(zmiany, x, y + 1, true);
            zmiany = setZapalony(zmiany, x + 1, y, true);
            zmiany = setZapalony(zmiany, x + 1, y + 1, true);
          }
        }
      }
      for (int x = 0; x < ROZMIAR; ++x)
      {
        for (int y = 0; y < ROZMIAR; ++y)
        {
          if (getZapalony(zmiany, x, y))
            nowyStan = setZapalony(nowyStan, x, y, !getZapalony(stan, x, y));
        }
      }
      /*if (stan != nowyStan)
      {
      std::cout << "AAAAAAAAAAAAAAAAA\n";
      print(stan);
      print(nowyStan);
      }*/
      stan = nowyStan;
    }
    if (stanyOsiagalne.size() >= maxWynik)
    {
      maxWynik = stanyOsiagalne.size();
      std::cout << stanyOsiagalne.size() << "\n";
      print(stanPoczatkowy);
    }
  }






  return 0;
}