会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
prime
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
17
18
19
20
21
22
23
24
下一页
2017年3月3日
P1330 封锁阳光大学
摘要: luogu坑: 图可能分为多个连通块,对于每个连通块都要找染色个数较小的那种颜色,sum进ans#include//对于每一块连通分量都应该能够分为二分图 才能够封锁全部的道路,否则Impossible #include#include#include#include#includ...
阅读全文
posted @ 2017-03-03 15:53 primes
阅读(299)
评论(0)
推荐(0)
2017年3月1日
1022 舞会2
摘要: vijos#include#include#include#include#include#include#includeusing namespace std;vector a[202];int n,m,dfs_num=0,dfn[202],low[202],color_num...
阅读全文
posted @ 2017-03-01 15:53 primes
阅读(124)
评论(0)
推荐(0)
1626 爱在心中
摘要: vijos描述“每个人都拥有一个梦,即使彼此不相同,能够与你分享,无论失败成功都会感动。爱因为在心中,平凡而不平庸,世界就像迷宫,却又让我们此刻相逢Our Home。” 在爱的国度里有N个人,在他们的心中都有着一个爱的名单,上面记载着他所爱的人(不会出现自爱的情况)。爱是具有传递性...
阅读全文
posted @ 2017-03-01 15:49 primes
阅读(324)
评论(0)
推荐(0)
2017年2月26日
P2024 食物链(two)
摘要: luoguvijos两种方法一、带权并查集:问题 front做差#include#include #include#include#include#include#include#includeusing namespace std;int f[50001],front[50000...
阅读全文
posted @ 2017-02-26 11:26 primes
阅读(345)
评论(0)
推荐(0)
2017年2月24日
P1196 银河英雄传说
摘要: 设置两个数组来记录后面的长度和前面的长度#include#include #include#include#include#include#include#includeusing namespace std;int behind[30010],front[30010],f[300...
阅读全文
posted @ 2017-02-24 13:33 primes
阅读(168)
评论(0)
推荐(0)
2017年2月22日
P1892 团伙
摘要: 朴素并查集#include#include#include#include#include#include#includeusing namespace std;int n,m;vector dr[1001];int py[1001];int findpy(int x){ ...
阅读全文
posted @ 2017-02-22 15:51 primes
阅读(230)
评论(0)
推荐(0)
2017年2月10日
P1546 最短网络(最小生成树)
摘要: 题见洛谷最小生成树prim 并点#include#include#include#include #includeusing namespace std;int tu[101][101],dis[101],a[101];int main(){ //freopen("a.i...
阅读全文
posted @ 2017-02-10 11:37 primes
阅读(166)
评论(0)
推荐(0)
烦人的幻灯片(拓扑)
摘要: Page 527 出现的 大 错误:ans[ ] 内的数不是一个一个挨着放进去的 !而是按照扫到的范围的顺序放进去 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> u
阅读全文
posted @ 2017-02-10 08:21 primes
阅读(465)
评论(0)
推荐(0)
2017年2月9日
例4.15 奖金(拓扑排序)
摘要: #include#include#include#include #includeint n,m;int f[10001];int tree[10001][301];int r[10001],ans=0;using namespace std;int main(){ scan...
阅读全文
posted @ 2017-02-09 16:07 primes
阅读(190)
评论(0)
推荐(0)
P1156 垃圾陷阱(dp)有待理解
摘要: 题见洛谷#include#include#include#include #includeusing namespace std;int deep,n,maxl=0,anst=999999;struct H{ int tim,tall,last;}st[200];int f[...
阅读全文
posted @ 2017-02-09 09:46 primes
阅读(133)
评论(0)
推荐(0)
上一页
1
···
17
18
19
20
21
22
23
24
下一页
公告