- 博客(5)
- 收藏
- 关注
原创 poj 1769 Minimizing maximizer 单点更新线段树
//poj 1769//sep9#include using namespace std;const int MAXN=100012;const int MAXX=9999999;int n,m;int minv[MAXN*4];void build(int l,int r,int k) { minv[k]=MAXX; if(l==r) ret
2017-08-30 21:15:25 849
原创 poj 2286 The Rotation Game 迭代加深搜索
//poj 2286//sep9#include using namespace std;int move[8][9]={{0,2,6,11,15,20,22}, {1,3,8,12,17,21,23}, {10,9,8,7,6,5,4}, {19,18,17,16,15,14,13}, {23,21,17
2017-08-24 19:18:44 482
原创 poj 1180 Batch Scheduling dp斜率优化
题意: 设dp[i]=min dp[j]+(S+sumT[i]-sumT[j])*F[i] 1分析: dp[i]=min (S+sumT[i])*sumF[i]+dp[j]-sumT[j]*F[i],由于F[i]随i减小单增,sumT[j]随i减小单增,按照i从N到1倒推dp[i]满足单调队列优化的条件dp[i]=S(i)+min{fj(i)|i代码:
2017-08-23 20:18:19 394
原创 poj 3155 Hard Life 最大密度子图
//poj 3155//sep9#include #include using namespace std; const int MAXN=512; const int MAXM=20000;const double MAX=1e7; typedef double cap_type; struct Edge { int v,nxt; ca
2017-08-04 06:01:04 437
原创 poj 1022 Packing Unit 4D Cubes 搜索
//poj 1022//sep9#include using namespace std;const int MAXN=128;const int MAX_INDEX=1024;int g[MAXN][MAXN][10];int vis[MAXN],map[MAX_INDEX],minx[4],maxx[4],x[4];int cases,n,cnt;void dfs(int
2017-08-02 19:36:10 451
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人