avatar
文章
464
标签
16
分类
76

Believe it

Believe it

bzoj1924
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog bzoj1924 题意:         在宽广的非洲荒漠中,生活着一群勤劳勇敢的羊驼家族。被族人恭称为“先知”的Alpaca L. Sotomon是这个家族的领袖,外人也称其为“所驼门王”。所驼门王毕生致力于维护家族的安定与和谐,他曾亲自率军粉碎河蟹帝国主义的野蛮侵略,为族人立下赫赫战功。所驼门王一生财宝无数,但因其生性节俭低调,他将财宝埋藏在自己设计的地下宫殿里,这也是今天Henry Curtis故事的起点。Henry是一个爱财如命的贪婪家伙,而又非常聪明,他费尽心机谋划了这次盗窃行动,破解重重机关后 ...
bzoj2118
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog bzoj2118 Dedivion 墨墨突然对等式很感兴趣,他正在研究a1x1+a2y2+…+anxn=B存在非负整数解的条件,他要求你编写一个程序,给定N、{an}、以 及B的取值范围,求出有多少B可以使等式存在非负整数解。 Input 输入的第一行包含3个正整数,分别表示N、BMin、BMax分别表示数列的长度、B的下界、B的上界。输入的第二行包含N个整数,即 数列{an}的值。 Output 输出一个整数,表示有多少b可以使等式存在非负整数解。 Sample Input 2 5 10 3 5 ...
bzoj2730
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog bzoj2730 题意:         煤矿工地可以看成是由隧道连接挖煤点组成的无向图。为安全起见,希望在工地发生事故时所有挖煤点的工人都能有一条出路逃到救援出口处。于是矿主决定在某些挖煤点设立救援出口,使得无论哪一个挖煤点坍塌之后,其他挖煤点的工人都有一条道路通向救援出口。请写一个程序,用来计算至少需要设置几个救援出口,以及不同最少救援出口的设置方案总数。 输入:         输入文件有若干组数据,每组数据的第一行是一个正整数 N(N≤500),表示工地的隧道数,接下来的 N ...
hdu5727
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog hdu5727 题意:         给你最n个阳珠子和n个阴珠子(n≤9),要你串成阴阳相隔的珠链,有一些阳珠子不能和某些阴珠子放一起,否则会失去光芒,询问至少有几个阳珠子失去光芒. 因为阴阳相隔,所以我们可以考虑枚举阴珠子的全排列,在阴珠子之间插入阳珠子完成,插入使用二分图匹配完成。 优化:   1.考虑旋转,锁定全排列中第一个数字即可   2.考虑翻转,hash环排列以及他的翻转排列即可 #include ...
hdu5729
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog hdu5729 题意:         给你n行m列的网格图,对于一个网格图,他是不稳定的,因为他是四边形,允许你在四边形里面加边斜边,斜边有两种,加斜边之后当前格子变成两个三角形具有稳定性,当所有格子稳定时,称整个网格稳定。询问你有多少种加边的方法使得网格图稳定。 一方面: 先考虑网格不稳定的表现,发现有一些当前垂直的横边与竖边,不具有稳定性,有变得不垂直的可能。 再考虑网格稳定的表现,如果所有的横边与竖边永远保持垂直,那么网格稳定。 -------(1) 另 ...
hdu6445
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog hdu6445 题意:         Given a tournament, you need to determine the direction of the remaining sides to maximize the answer. The answer is calculated in the following way. The vertices are labeled from 0 to n−1, and the matrix s is used to represent the edges.     & ...
hdu6611
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog hdu6611 求k个不相交子序列,让其和最大。 使用dij费用流即可 做法一: 用主席树优化建图,用dp优化第一次dij算法 #include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; struct MCMF{ static const int maxn=2005*20*2,maxm=2+3*2005+2005*20*4; struct star{int v,nex,c,w;} edge[maxm<<1]; int head[maxn],cnt,n; int pre[maxn],dist[maxn],h[maxn];// h -& ...
poj3177
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog zoj4097 题意: 模版题,给你一幅图,问你最少加几条边,使得图变成一个双联通分量。 模版 // #include<bits/stdc++.h> #include<iostream> #include<cstdio> using namespace std; struct Graph{ static const int maxn=1e5+5, maxm=3e5+5; struct star{int v,nex;}edge[maxm<<1]; int head[maxn],d[maxn] ...
uoj111
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog uoj111 优化建图即可,对图分块,但是这样还是过不了,因为常数过大,不建图跑dij还是会tle,要用spfa才能过 #include<bits/stdc++.h> #include<bits/extc++.h> using namespace std; typedef pair<int,int> pii; int main(){ int n,m; scanf("%d%d",&n,&m); int sqr=200; vector<vector<int> >dog(n),havedog(n,vector<int>(sqr,0)); int src=0,dst= ...
uoj67
发表于2019-08-05|ACM老Blog迁移problemgraph_theory
nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 转移自老blog uoj67 题意:         辞旧迎新之际,喜羊羊正在打理羊村的绿化带,然后他发现了一棵长着毒瘤的树。         这个长着毒瘤的树可以用 n 个结点 m 条无向边的无向图表示。这个图中有一些结点被称作是毒瘤结点,即删掉这个结点和与之相邻的边之后,这个图会变为一棵树。树也即无简单环的无向连通图。         现在给你这个无向图,喜羊羊请你帮他求出所有毒瘤结点。 ...
1…383940…47
avatar
fightinggg
O ever youthful, O ever weeping
文章
464
标签
16
分类
76
Follow Me
公告
This is my Blog
最新文章
智慧的疆界:从图灵机到人工智能2023-05-17
Transformer2023-03-28
2023你好2023-02-06
VPN与代理那些事2022-07-24
CPU架构介绍2022-07-19
分类
  • ACM238
    • 刷题实战56
      • CodeForces7
      • bzoj4
      • hdu19
      • uoj1
      • 比赛15
      • 洛谷3
标签
AI AspectJ CPU docker 结构体中的引用 SpringFox使用 跟我一起写编译器 GPT linux指令 读书,HTTP 读书 flag Transformer Proxy VPN nginx
归档
  • 五月 20231
  • 三月 20231
  • 二月 20231
  • 七月 20223
  • 五月 20221
  • 三月 20221
  • 二月 20221
  • 一月 20221
网站资讯
文章数目 :
464
本站访客数 :
本站总访问量 :
最后更新时间 :
©2020 - 2023 By fightinggg
框架 Hexo|主题 Butterfly