#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int x;
int y;
float start;
float h;
int half;
float terrain[32][32];
start=1000;
h = 0.5;
half = 16;
terrain[0][0]=5;
terrain[32][0]=5;
terrain[32][32]=5;
terrain[0][32]=5;
while (half >= 1)
{
for ( int x = half; x < 32-half; x=x+half )
{
for ( int y = half; y < 32-half; y=y+half )
{
terrain[x][y]=1;
}
}
half=half/2;
start=start*half;
}
for ( int x = 0; x < 32; x++)
{
for ( int y = 0; y < 32; y++ )
{
cout<< terrain[x][y] << " " ;
}
cout<< "\n";
}
cin.get();
}