
poj
超越大哥哥
这个作者很懒,什么都没留下…
展开
-
poj1125 spfa最短路
#include<iostream>#include<cstdio>#include<queue>#include<string.h>using namespace std;int inf=0x3f3f3f;int a[105];int n;int mp[105][105];int dis[105];int vis[105];...原创 2018-09-19 11:56:44 · 159 阅读 · 0 评论 -
poj1330 LCA(tarjan模板)
//tarjan牛逼#include<cstdio>#include<iostream>#include<string.h>using namespace std;const int maxn = 500000+100;const int maxq = 500010;int F[maxn];int find(int x){//找到祖先 ...原创 2019-04-10 19:53:41 · 143 阅读 · 0 评论 -
poj1321棋盘问题(简单暴搜)
写了一发简单暴搜发现好久不写自己已经不熟练了(wa了几发)wa的原因是我的代码实现出来是从第i行开始每次在下一行都选棋子放但其实可以选择跳过这一行不放 下一行放....so 代码如下(main里面注释的是之前错误的写法)//// Created by xingchaoyue on 2019/4/24.//#include<iostream>#include&...原创 2019-04-24 09:05:32 · 100 阅读 · 0 评论 -
poj2253(dijistra变形+堆优化)
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sun...原创 2019-05-05 16:11:15 · 191 阅读 · 0 评论 -
poj3264(线段树)
//// Created by xingchaoyue on 2019/5/14.//#include<iostream>#include<cstdio>using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1typedef long long ll;...原创 2019-05-14 10:24:16 · 303 阅读 · 0 评论 -
poj3281(dinic-kuangbin)
QAQ终于学会网络流层次图残余网络怎么回事了这里用的是kuangbin大大的dinic模板kuangbin大大与众不同 经过实践...能比一般的dinic快10倍左右/*最大流模板dinic算法*/#include<stdio.h>#include<string.h>#include<algorithm>#include<ios...原创 2019-05-06 20:07:35 · 228 阅读 · 0 评论 -
poj2251(简单搜索)
三维简单搜索结果为1时输出去掉s//// Created by xingchaoyue on 2019/5/10.//#include<iostream>#include<cstdio>#include<queue>#include<string.h>using namespace std;int n,m,k;char ...原创 2019-05-10 18:06:56 · 179 阅读 · 0 评论 -
poj2774(后缀数组)
#include<iostream>#include<cstdio>#include<string.h>#include<algorithm>#include<cmath>using namespace std;const int maxn = 2e5+100;char s[maxn];int t1[maxn],t2[...原创 2019-08-06 20:48:00 · 199 阅读 · 0 评论 -
poj3660(floyd求传递闭包)
#include<iostream>#include<cstdio>using namespace std;int n,m;const int inf = 0x3f3f3f3f;int mp[200][200];void init(){ for(int i = 0;i<=100;++i){ for(int j = 0;j<=...原创 2019-08-28 18:49:34 · 172 阅读 · 0 评论