题目链接: http://poj.org/problem?id=2083 题目描述: n = 1时,图形b[1]是X n = 2时,图形b[2]是X X X X X 所以n时,图形b[n]是b[n-1] b[n-1] b[n-1] b[n-1] b[n-1] 解题思路: 用递归打印图形,存到二维数组里面,输出是一个矩形,竟然是一个矩形!!!!!! 代码: #include <cm…
Fractal Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 6646 Accepted: 3297 Description A fractal is an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales. The object need not exhibit exactly…
http://poj.org/problem?id=2083 Fractal Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 8317 Accepted: 3957 Description A fractal is an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales. The…
SudoKu Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu POJ 2676 Description Sudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the c…
题意:大致就是要求画出这个有规律的Fractal图形了= = 例如 1 对应 X 2 对应 X X X X X 这个题是个理解分治法很典型的例子(详情请参见Code) 分治法:不断缩小规模,以致把整个大问题分解为若干个可以直接处理的小问题,一般通过递归调用实现,可以用极简代码完成高复杂的工作,但空间与时间占用也相对较大. //分治法画图 //Memory:880K Time:16 Ms #include<iostream> #include<cstring> #inc…