会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
复制代码
pg633
人生的不同取决于你的选择,只要还有选择的权力,你的人生必定不同
博客园
新随笔
联系
管理
上一页
1
···
4
5
6
7
8
9
10
11
下一页
2018年3月15日
二分图算法
摘要: 1 判定: 采用 bfs 搜索染色 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); const int inf = 9876
阅读全文
posted @ 2018-03-15 22:02 pg633
阅读(471)
评论(0)
推荐(0)
2018年3月14日
博弈论 Nim,sg
摘要: 博弈论 首先,定义一下 状态Position P 先手必败 N x先手必胜 操作方法: 反向转移 相同状态 不同位置 的一对 相当于无 对于ICG游戏,我们可以将游戏中每一个可能发生的局面表示为一个点。并且若存在局面i和局面j,且j是i的后继局面(即局面i可以转化为局面j),我们用一条有向边,从i出
阅读全文
posted @ 2018-03-14 21:51 pg633
阅读(330)
评论(0)
推荐(0)
扫雷算法
摘要: 所谓扫雷首先一个简单只有一行啊 a[i]=a[i-1]-vis[i-1]-vis[i-2] 通过二元一次方程 正推 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen
阅读全文
posted @ 2018-03-14 19:36 pg633
阅读(3328)
评论(0)
推荐(0)
2018年3月13日
最小生成树
摘要: 算法一:prime 特别好用的 O(n^2)和dij 差了两行 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); #defin
阅读全文
posted @ 2018-03-13 20:37 pg633
阅读(179)
评论(0)
推荐(0)
堆操作
摘要: 传送门 模拟堆 #include <cstdio> #include <iostream> using namespace std; int heap[100005], size = 0; //第一个元素的下标为1. void push(int x){ int i = ++size; while(i
阅读全文
posted @ 2018-03-13 18:14 pg633
阅读(153)
评论(0)
推荐(0)
最短路径
摘要: 算法一 :迪杰斯特拉 算法详情:贪心 维护一个 dis 数组 进行 松弛操作 适用: 单源最短路 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w
阅读全文
posted @ 2018-03-13 15:47 pg633
阅读(135)
评论(0)
推荐(0)
2018年3月11日
树中的最长路
摘要: 传送门 bfs 大法 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","w",stdout); typedef long long ll; #defi
阅读全文
posted @ 2018-03-11 17:07 pg633
阅读(139)
评论(0)
推荐(0)
状态压缩
摘要: hiho1 1044 状态压缩·一 hiho2 1048 状态压缩·二 这两个状态压缩,很好玩的啊 #include<bits/stdc++.h> using namespace std; #define LOACL freopen("in","r",stdin);\ freopen("out","
阅读全文
posted @ 2018-03-11 17:06 pg633
阅读(121)
评论(0)
推荐(0)
2018年3月10日
cf 469
摘要: A Left-handers, Right-handers and Ambidexters B Intercepted Message C Zebras D A Leapfrog in the Array #include <bits/stdc++.h> using namespace std; t
阅读全文
posted @ 2018-03-10 11:46 pg633
阅读(232)
评论(0)
推荐(0)
2018年3月7日
快速幂 板子
摘要: 典型分治思想
阅读全文
posted @ 2018-03-07 19:55 pg633
阅读(167)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
下一页