Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
910 B
0
Indexable
Never
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <fstream>
using namespace std;
int main()
{
	int n, m, k, x, y;
	cin >> n >> m >> k;
	vector <vector <char>> a(n + 10, vector <char> (m + 10));
	
	for (int i = 0; i < k; i++)
	{
		cin >> x >> y;
		a[x][y] = '*';
	}
	/*for (int i = 1, bombs = 0; i < n + 10; i++)
	{
		for (int j = 1; j < m + 10; j++)
		{
			a[i][j] = 0;
			if (a[i][j] != '*') {

				if (a[i + 1][j] == '*' ||
					a[i - 1][j] == '*' ||
					a[i][j - 1] == '*' ||
					a[i][j + 1] == '*' ||
					a[i + 1][j - 1] == '*' ||
					a[i - 1][j + 1] == '*' ||
					a[i - 1][j - 1] == '*' ||
					a[i + 1][j + 1] == '*') {
					bombs++;
				}
				
				a[i][j] += bombs;
				
			}

		}
	} */
	for (int i = 0; i < n+ 1; i++)
	{
		for (int j = 0; j < m + 1; j++)
		{
			cout << a[i][j] << "_";
		}
		cout << "\n";
	}

}