- 博客(3)
- 收藏
- 关注
原创 poj 1190 dfs+剪枝
题意: 维数为m,维度需枚举的深搜,剪枝很重要,手痒了随便找题写写没想到被卡了2个小时。。 代码: //poj 1190 //sep9 #include #include using namespace std; int N,M,ans,rm,min_s[20],min_v[20]; void dfs(int cur,int res,int sum,int pre_r,int pre_
2016-03-18 17:47:44 518 1
原创 poj 2437 Muddy roads 贪心
//poj 2437 //sep9 #include #include using namespace std; int N,L; struct SEG { int a,b; }seg[10024]; int cmp(SEG x,SEG y) { return x.a<y.a; } int main() { scanf("%d%d",&N,&L); for(int i=0;i<
2016-03-04 15:25:55 945
原创 poj 3695 Rectangles 容斥原理解矩形面积并
//poj 3695 #include using namespace std; int n,m; int st[1200000],ask[120000]; struct REC { int x1,y1,x2,y2; }p[32]; void dfs(int xa,int ya,int xb,int yb,int deep,int flag,int sta) { if(xa>=xb||ya
2016-03-03 09:54:49 773
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人