摘要: 代码风格迥异 …… #include<bits/stdc++.h> const int N=1000+4,M=1000000+10,K=30+5; using namespace std; queue<int> q; int head[M],flt[M],nxt[M],to[M],cn=1; int 阅读全文
posted @ 2018-04-29 08:48 horsepower2001 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 代码风格迥异 …… 1 #include<bits/stdc++.h> 2 3 const int N=1000+5; 4 5 using namespace std; 6 7 int link[N],g[N][N],ansx[N]; 8 int n,m,u,v,ans; 9 bool vis[N] 阅读全文
posted @ 2018-04-29 08:46 horsepower2001 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 转换成最小割; #include <bits/stdc++.h> using namespace std ; const int mx [ 9 ] = { 2 , 2 , -2 , -2 , -1 , 1 , -1 , 1 } ; const int my [ 9 ] = { -1 , 1 , -1 阅读全文
posted @ 2018-04-29 08:44 horsepower2001 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 斯坦纳树 为什么我会写这个东西的博客呢? 某天我无意在洛谷里面找到了一道状压的题目,JLOI省选的然后当时兴冲冲开始做。想了3天3夜还是没有想出来,最后决定去搜题解……然后看到题解的时候——震惊!斯坦纳树是什么东西???于是去学习了斯坦纳树…… 其实斯坦纳树很好理解,它像线段树一样用于解决一类问题。 阅读全文
posted @ 2018-04-19 11:34 horsepower2001 阅读(647) 评论(0) 推荐(1) 编辑
摘要: Day 1 >>> T1 >> 水题一道 。 我们只需要 for 一遍 , 由于地毯是从下往上铺的 , 我们只需要记录该位置最上面的地毯的编号 , 每一次在当前地毯范围内就更新编号 , 最后的答案就是最后更新的编号。 1 #include<bits/stdc++.h> 2 using namespa 阅读全文
posted @ 2018-04-15 14:35 horsepower2001 阅读(167) 评论(0) 推荐(0) 编辑