题目描述:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=51165
/*
solution:
可以用迭代加深算法作为框架。搜索对象主要有两种:一是正方形,而是火柴。
个人采取前者。
date:2016/5/15
*/
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int maxn = 60;
int s, n, k, rec_size[maxn], rec_full_size[maxn], contain[maxn][maxn]; //contain[i][j] = 1代表编号为i的正方形包含了编号为j的火柴
int sticks[maxn], maxd; //stick[i] = 1代表编号为i的火柴存在
inline int get_sticks() {
return 2 * n * (n + 1);
}
inline int get_horizental(