#include #include #include using namespace std; bool ok(int n, int x) { return x >= 0 && x < n; } void draw_stump(vector& table, int x, int y) { if (ok(table.size(), x) && ok(table.size(), y)) table[y][x] = 'o'; if (ok(table.size(), x-1) && ok(table.size(), y)) table[y][x-1] = '_'; if (ok(table.size(), x+1) && ok(table.size(), y)) table[y][x+1] = '_'; } void draw_tree(vector& table, int x, int y, int s) { if (ok(table.size(), x) && ok(table.size(), y)) table[y][x] = '|'; if (ok(table.size(), x-1) && ok(table.size(), y)) table[y][x-1] = '_'; if (ok(table.size(), x+1) && ok(table.size(), y)) table[y][x+1] = '_'; for (int i=0; i>m>>n) { vector table(m, string(m, '.')); for (int i=0; i>s>>x>>y; if (s == 0) draw_stump(table, x, y); else draw_tree(table, x, y, s); } for (int i=0; i=0; --i) cout<<"*"<