上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 题目链接:https://nanti.jisuanke.com/t/17118 题解:http://m.blog.csdn.net/kkkkahlua/article/details/78009087(很详细的大佬的博客) 画个图自己琢磨一下,考虑0 >n-1,对于到n-1的每个流,来自0 >i和i 阅读全文
posted @ 2017-10-03 13:37 MeowMeowMeow 阅读(284) 评论(0) 推荐(0)
摘要: 二分求和或者矩阵套矩阵|A E| ^n = |A^n E+...+A^(n-1)||0 E| |0 E |对于这种构造,可以选择其中一行对4*4矩阵展开成3*3的对于下面这个代码https://cn.vjudge.net/solution/9721123 3*3矩阵构造可以是这样去想(dalao总是能从我注意不到的角度去看问题) https://past... 阅读全文
posted @ 2017-10-02 05:40 MeowMeowMeow 阅读(310) 评论(0) 推荐(0)
摘要: 题目连接:https://vjudge.net/problem/HDU-1956 题意:给定一些点和一些边,有些边是有向的,,有些边是无向的,求是否存在欧拉回路。 题解:想不到的网络流。 混合图:即有的边有向,有的边无向。 定义: 对于图G的一个回路,若它恰通过G中每条边一次,则称该回路为欧拉(Eu 阅读全文
posted @ 2017-10-01 17:31 MeowMeowMeow 阅读(429) 评论(0) 推荐(0)
摘要: #include #include #include #include #include #include using namespace std; const int maxn=(int)5e5+1e5; const int maxm=(int)1e6+1e5+5; #define meowmeow meow-- int pos[100005]; char s1[(int)2e5+10]... 阅读全文
posted @ 2017-09-30 17:14 MeowMeowMeow 阅读(202) 评论(0) 推荐(0)
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=3416 题意:starvae在城市A,要去城市B约妹子,要走最短路,并且每段路只能走一次,不能重复走。 题解:在走最短路的情况下,有多少条路从A到B,并且每条路是不重复的(路上经过的任何一条边都不可以重复)。 阅读全文
posted @ 2017-09-29 13:41 MeowMeowMeow 阅读(169) 评论(0) 推荐(0)
摘要: 链接:https://nanti.jisuanke.com/t/16959 题意:从大连出发,经途经上海,然后最终到达西安,每个地方只能经过一次,然后给出一些无向有权变,求最短的距离。 题解:最小费用最大流,要抽象出模型来。因为每个地方只能经过一次,因此要拆点,将每个地方作为一个点,将这个点拆成入点 阅读全文
posted @ 2017-09-25 17:20 MeowMeowMeow 阅读(201) 评论(0) 推荐(0)
摘要: 链接:https://vjudge.net/problem/27475 题意:给定一个二维矩阵,在一些格子里放置了东西,然后你有一门炮,每次能横向或纵向开一炮,将这一行所有的东西摧毁。问你最少花多少炮弹摧毁所有的东西?并输出一组解。 题解: 很久之前做的题目了,今天在看到的时候还是很有新的体会的。这 阅读全文
posted @ 2017-09-25 16:45 MeowMeowMeow 阅读(255) 评论(0) 推荐(0)
摘要: http://bbs.csdn.net/topics/392049388 https://post.icpc-camp.org/d/669-ccf-2014-03-05 阅读全文
posted @ 2017-09-25 06:10 MeowMeowMeow 阅读(1588) 评论(0) 推荐(1)
摘要: #include #include #include //debug心累- - using namespace std; int n; char s[maxn]; int a[maxn][maxn]; int main(){ scanf("%d\n",&n); while(n--){ gets(s); int l=strlen(s); ... 阅读全文
posted @ 2017-09-22 16:05 MeowMeowMeow 阅读(197) 评论(0) 推荐(0)
摘要: // A solution can be found by solving a linear system over 𝔽₂, the field of two elements. I'll explain briefly how this is done. // // Suppose first 阅读全文
posted @ 2017-09-17 22:03 MeowMeowMeow 阅读(206) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 8 下一页