ULM02 - The Sierpinski Fractal

题意翻译

将一个三角形分成四个相等的半高三角形,然后去掉中间的三角形。将这样的操作递推地应用于其余三个三角形。以这种方式演化的分形称为Sierpinski三角。 对于这个问题,您只需使用ASCII字符,就可以将Sierpinski三角形概括到一定的递推深度。因为绘图分辨率是固定的,所以需要适当地增加字符。用两个斜杠画出最小的三角形(不再分开),反斜杠和两个下划线如下: / \ 三角形: ``` cout<<" /\ "<<endl; cout<<"/__\"<<endl; ``` 二次分型: ``` cout<<" /\ "<<endl; cout<<" /__\ "<<endl; cout<<" /\ /\ "<<endl; cout<<"/__\/__\"<<endl; ``` 三次分型: ``` cout<<" /\ "<<endl; cout<<" /__\ "<<endl; cout<<" /\ /\ "<<endl; cout<<" /__\/__\ "<<endl; cout<<" /\ /\ "<<endl; cout<<" /__\ /__\ "<<endl; cout<<" /\ /\ /\ /\ "<<endl; cout<<"/__\/__\/__\/__\"<<endl; ``` 输入输出格式: 输入一个正整数x; 输出对应大小的图腾。

题目描述

Consider a regular triangular area, divide it into four equal triangles of half height and remove the one in the middle. Apply the same operation recursively to each of the three remaining triangles. If we repeated this procedure infinite times, we'd obtain something with an area of zero. The fractal that evolves this way is called the Sierpinski Triangle. Although its topological dimension is _2_, its Hausdorff-Besicovitch dimension is_log(3)/log(2)~1.58_, a fractional value (that's why it is called a fractal). By the way, the Hausdorff-Besicovitch dimension of the Norwegian coast is approximately _1.52_, its topological dimension being _1_. For this problem, you are to outline the Sierpinski Triangle up to a certain recursion depth, using just ASCII characters. Since the drawing resolution is thus fixed, you'll need to grow the picture appropriately. Draw the smallest triangle (that is not divided any further) with two slashes, to backslashes and two underscores like this: /\\

输入输出格式

输入格式


输出格式


输入输出样例

暂无测试点