当前位置: 首页 > news >正文

wordpress loper国内seo工具

wordpress loper,国内seo工具,西平县建设局网站,做音乐网站没有版权标题来源#xff1a;Light OJ 1406 Assassins Creed 意甲冠军#xff1a;向图 派出最少的人经过全部的城市 而且每一个人不能走别人走过的地方 思路#xff1a;最少的的人能够走全然图 明显是最小路径覆盖问题 这里可能有环 所以要缩点 可是看例子又发现 一个强连通分量可能… 标题来源Light OJ 1406 Assassins Creed 意甲冠军向图 派出最少的人经过全部的城市 而且每一个人不能走别人走过的地方 思路最少的的人能够走全然图 明显是最小路径覆盖问题 这里可能有环 所以要缩点 可是看例子又发现 一个强连通分量可能要拆分 n最大才15 所以就状态压缩  将全图分成一个个子状态 每一个子状态缩点 求最小路径覆盖 这样就攻克了一个强连通分量拆分的问题 最后状态压缩DP求解最优值 #include cstdio #include cstring #include vector #include algorithm #include stack using namespace std; const int maxn 16; vector int G[maxn], G2[maxn]; int dp[1maxn]; int pre[maxn], low[maxn], sccno[maxn]; int clock, scc_cnt; int n, m; stack int S; int a[maxn][maxn]; int b[maxn][maxn];void dfs(int u, int x) {pre[u] low[u] clock;S.push(u);for(int i 0; i G[u].size(); i){int v G[u][i];if(!(x(1v)))continue;if(!pre[v]){dfs(v, x);low[u] min(low[u], low[v]); }else if(!sccno[v]){low[u] min(low[u], pre[v]);}}if(pre[u] low[u]){scc_cnt;while(1){int x S.top(); S.pop();sccno[x] scc_cnt;if(x u)break;}} } int find_scc(int x) {memset(sccno, 0, sizeof(sccno));memset(pre, 0, sizeof(pre));scc_cnt 0, clock 0;for(int i 0; i n; i){if(x(1i) !pre[i])dfs(i, x);}return scc_cnt; }int y[maxn]; bool vis[maxn];bool xyl(int u) {for(int i 0; i G2[u].size(); i){int v G2[u][i];if(vis[v])continue;vis[v] true;if(y[v] -1 || xyl(y[v])){y[v] u;return true;}}return false; } int match() {int ans 0;memset(y, -1, sizeof(y));for(int i 1; i scc_cnt; i){memset(vis, false, sizeof(vis));if(xyl(i))ans;}return scc_cnt-ans; } int main() {int cas 1;int T;scanf(%d, T);while(T--){scanf(%d %d, n, m);for(int i 0; i n; i)G[i].clear();memset(a, 0, sizeof(a));while(m--){int u, v;scanf(%d %d, u, v);u--;v--;G[u].push_back(v);a[u][v] 1;}dp[0] 0;//puts(sdf);for(int i 1; i (1n); i){//memset(b, 0, sizeof(b));find_scc(i);for(int j 0; j n; j)G2[j].clear();for(int j 0; j n; j)for(int k 0; k n; k)if(a[j][k] sccno[j] sccno[k] sccno[j] ! sccno[k])G2[sccno[j]].push_back(sccno[k]);dp[i] match();}//puts(sdf);for(int s 1; s (1n); s){for(int i s; i; i s(i-1)){dp[s] min(dp[s], dp[s^i] dp[i]);}}printf(Case %d: %d\n, cas, dp[(1n)-1]);}return 0; }转载于:https://www.cnblogs.com/blfshiye/p/4594571.html
http://www.yutouwan.com/news/299804/

相关文章:

  • 个人主题网站设计wordpress 基础知识
  • 不用流量的地图导航软件番禺网站 优化
  • 门户网站的首页模板苏州建网站收费
  • 佛山中谦建设网站wordpress标签页固定链接
  • 国家级建设网站网站弹幕代码
  • 企业网站备案审核需要多长时间php如何做网站
  • 怎么做企业销售网站广州优质网站排名公司
  • php网站开发技术是什么哪里有制作网站
  • 广州手机网站建设公司哪家好原型图网站
  • 北京建设集团网站飞狐小说网站建设
  • 免费注册网站网址建设银行网站为什么进不去
  • 网站建设课本东莞网站建设 兼职
  • vs2017html5网站开发关键词智能调词工具
  • 阿里云部署多个网站建筑培训网官网查询
  • 帝国cms 门户网站中学生在哪里学编程最好
  • 成都网站制作公司 dedecms普洱市住房城乡建设局网站
  • 网站开发费用会计分录和田地网站seo
  • 网站备案收费标准做网站的宽度为多少
  • 做网站合肥哪家公司好计算机类专业包括哪些
  • 欣赏艺术类的网站wordpress主题的使用教程
  • 苏州高新区建设局网站管网wordpress怎么重新初始化
  • 网站开发前段和后端楼盘网站开发报价
  • 人才网站怎么建设wordpress主题比较
  • 双语版网站引导页央企八大设计院
  • 网站建设的公司推荐优秀的国风网页设计欣赏
  • 网站开发好的公司推荐wordpress 建站很简单
  • 可以做家教的网站有哪些网站建设计划书
  • 网站开发说明文档深圳平湖网站建设公司
  • 四川学校网站建设公wordpress视频列表
  • 建筑网站大全免费河北建设厅网站登陆怎么找附件