#include <iostream>
#include <random>
bool ShowTree(std::size_t N){
#if 0 //select auther's matching or parfect random
//いやー、ローカルで綺麗なツリーになかなかならなかったので手動指定しましたがalgorithmはランダム方面です。
std::random_device rd;
std::mt19937 mt(rd());
#else
std::mt19937 mt(1);
#endif
std::discrete_distribution<> dd = { 63, 1, 1, 1, 1, 1, 1, 1, };
std::string Dec = "*NiXJo%b";
for (std::size_t j = 0; j < N; j++) std::cout << ' ';
std::cout << "★";
for (std::size_t i = 0; i < N+1; i++){
for (std::size_t j = i-1; j < N; j++) std::cout << ' ';
for (std::size_t j = 0; j < (i * 2); j++) std::cout << Dec[dd(mt)];
std::cout << std::endl;
}
for (std::size_t j = 0; j < N; j++) std::cout << ' ';
std::cout<<"||"<<std::endl;
return true;
}
int main(){
for (int i = 0; i < 7; i++){
ShowTree(i);
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8cmFuZG9tPgoKYm9vbCBTaG93VHJlZShzdGQ6OnNpemVfdCBOKXsKI2lmIDAgLy9zZWxlY3QgYXV0aGVyJ3MgbWF0Y2hpbmcgb3IgcGFyZmVjdCByYW5kb20gCgkvL+OBhOOChOODvOOAgeODreODvOOCq+ODq+OBp+e2uum6l+OBquODhOODquODvOOBq+OBquOBi+OBquOBi+OBquOCieOBquOBi+OBo+OBn+OBruOBp+aJi+WLleaMh+WumuOBl+OBvuOBl+OBn+OBjGFsZ29yaXRobeOBr+ODqeODs+ODgOODoOaWuemdouOBp+OBmeOAggoJc3RkOjpyYW5kb21fZGV2aWNlIHJkOwoJc3RkOjptdDE5OTM3IG10KHJkKCkpOwojZWxzZQoJc3RkOjptdDE5OTM3IG10KDEpOwojZW5kaWYKCXN0ZDo6ZGlzY3JldGVfZGlzdHJpYnV0aW9uPD4gZGQgPSB7IDYzLCAxLCAxLCAxLCAxLCAxLCAxLCAxLCB9OwoJc3RkOjpzdHJpbmcgRGVjID0gIipOaVhKbyViIjsKCglmb3IgKHN0ZDo6c2l6ZV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