真的写的心好累啊。。
感觉脑子都不转了
好吧,生活还得继续。。
刚开始接触动态压缩DP
这个题的意思就是分割巧克力。
一个巧克力分成n块,并且这n块秀必须是矩形的,问是否可以分?
输入:
n
行 列
a0 a1 a2…an
4
3 4
6 3 2 1
2
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int N=17;
const int XY=110;
int n,x,y,w[N],sum[1<<N],visit[1<<N][XY];