上一页 1 2 3 4 5 6 ··· 24 下一页
摘要: 【60分】 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<string> 5 #include<cmath> 6 #include<algorithm> 7 #include<queue> 8 #incl 阅读全文
posted @ 2018-06-19 12:38 shulin15 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 【思路】 dp[i][j]表示前i个数为第j种状态,考虑6种状态 0: 出现且仅出现 2 1: 出现且仅出现 2 0 2: 出现且仅出现 2 3 3: 出现且仅出现 2 0 1 4: 出现且仅出现 2 0 3 5: 出现且仅出现 2 0 1 3 【AC】 阅读全文
posted @ 2018-06-18 12:30 shulin15 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 12 using namespace std; 13 typedef long long ll; 14 const dou... 阅读全文
posted @ 2018-06-17 23:27 shulin15 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 【思路】 多个起点同时四周扩展广搜,注意会爆int 【AC】 阅读全文
posted @ 2018-06-17 17:29 shulin15 阅读(295) 评论(1) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; const int maxn=2e4+2; const int maxm=2e4+2; const int inf=0x3f3f3f3f; int n,m; struct edge{ int to; int nxt; }e[2*m... 阅读全文
posted @ 2018-06-17 15:15 shulin15 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 【AC】 阅读全文
posted @ 2018-06-17 15:14 shulin15 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 80分,暂时没找出20分的Bug 阅读全文
posted @ 2018-06-17 15:11 shulin15 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 【题意】 给定一个有向图,问图中互相可达(强连通)的点有多少对 【AC】 强连通缩点,缩点后是一个DAG,所以互相可达的点只在强连通块里。 阅读全文
posted @ 2018-06-17 12:18 shulin15 阅读(163) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std; int n,m; const int maxn=1e4+2; const int maxm=5e4+2; int degree[maxn]; int fa[maxn]; struct edge{ int to; ... 阅读全文
posted @ 2018-06-16 21:44 shulin15 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 【题意】 给定有n个点,m条边的无向图,没有平行边和自环,求从1到n的路径中,最长段的最小值(最短路不再是路径和,而是所有段中的最大值) 【AC】 阅读全文
posted @ 2018-06-16 16:32 shulin15 阅读(156) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 24 下一页