hdu 4090 GemAnd Princs这题很长,但是就是一个暴搜+减枝减枝: 现在的最大值 在上剩下的各颜色的平方(假设其它相同颜色都是连在一起的),不加会 tle;还要说的是,当相同颜色的块<=2时,是不需要接着dfs 的View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 6 int n,m,k,best; 7 int a[9][9],ge[7]; 8 9 void getbian() //get... Read More
posted @ 2012-10-23 19:39
feng_linxu
Views(168)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号