dfs
yxr0105
这个作者很懒,什么都没留下…
展开
-
hdu2196 computer dfs 树形dp
#include #include #include #include using namespace std; const int N=10005; struct E {int to,nxt,w;}edge[N+N]; int idx[N],tot,n; bool vis[N]; int max1[N],max2[N],up[N]; void addedge(int from,int to,in原创 2016-02-04 21:04:51 · 324 阅读 · 0 评论 -
5.16pkusc模拟赛1
A.切绳子,不可多条连接,求n条绳子切成k段的最大长度。 卡精度?转成cm二分。n<=10000(5.16)#include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<algorithm> #define N 10005 using namespace std; int n,k; double a[N]原创 2016-05-18 09:34:39 · 458 阅读 · 0 评论 -
5.17pkusc模拟赛4
A. B.求只存在简单环的最小环。(5.18)#include<iostream> #include<cstdio> #include<cstring> #define N 5000 #define M 10000 using namespace std; struct E{int to,nxt;}edge[M*2]; bool vis[N]; int dis[N]; int idx[N],tot原创 2016-05-18 10:00:47 · 335 阅读 · 0 评论