摘要: 题意:给出一些树的位置,价值,长度,现要求先砍一些树制成一定长度的篱笆将剩余的树围起来,求要砍树的最小总价值。因为树的个数最多为15个很容易想到用二进制数表示树的状态进行遍历。#include<iostream>#include<cstdio>#include<cmath>using namespace std;#define MAX_INT 123456789#define esp 10e-8struct point { int x,y;};point vertex[16];int res[16],Choice[16],noChoice[16],minLe 阅读全文
posted @ 2011-11-13 18:50 书山有路,学海无涯 阅读(196) 评论(0) 推荐(0) 编辑