随笔分类 -  ACM

1 2 3 4 5 ··· 11 下一页
摘要:lower_bound: [l, r)区间内大于等于val的第一个位置 upper_bound: [l, r)区间内大于val的第一个位置 [l, r)区间内小于等于val的第一个位置:upper_bound(l, r, val) - 1 [l, r)区间内小于val的第一个位置:lower_bou 阅读全文
posted @ 2018-11-17 11:27 shulin15 阅读(247) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 int n; 10 const int maxn=1e3+2; 11 char str[maxn]; 12 string rel; 13 void handle(){ 14 int l... 阅读全文
posted @ 2018-06-22 21:44 shulin15 阅读(273) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include #include using namespace std; int n; string cmd; int now=0; struct node{ int attack; int health; node(int _attack,int _health):attac... 阅读全文
posted @ 2018-06-22 19:58 shulin15 阅读(500) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; const int maxn=1e2+2; char str[maxn]; void line(int l,int r){ int i=l; while(str[i]=='#'||str[i]=='*'||str[i]==' ') i++; ... 阅读全文
posted @ 2018-06-22 17:43 shulin15 阅读(293) 评论(0) 推荐(0)
摘要:#include #include #include #include #include #include using namespace std; int n,m; const int maxn=82; char str[maxn]; bool flag; map mp; string handle(string fa){ int len=strlen(str); len--... 阅读全文
posted @ 2018-06-22 17:42 shulin15 阅读(443) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 int n,m; 11 const int maxn=1e2+2; 12 string rule[maxn],value[max... 阅读全文
posted @ 2018-06-20 14:27 shulin15 阅读(856) 评论(0) 推荐(0)
摘要:http://hihocoder.com/problemset/problem/1369?sid=1328132 参考 https://blog.csdn.net/a1799342217/article/details/73195243 https://blog.csdn.net/a51978118 阅读全文
posted @ 2018-06-19 20:41 shulin15 阅读(356) 评论(0) 推荐(0)
摘要:【AC】 1 #include<iostream> 2 #include<math.h> 3 #include<cstring> 4 5 using namespace std; 6 7 typedef long long LL; 8 9 int N,M; 10 int type,l,r,v; 11 阅读全文
posted @ 2018-06-19 12:40 shulin15 阅读(276) 评论(0) 推荐(0)
摘要:【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 阅读(306) 评论(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 阅读(207) 评论(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 阅读(320) 评论(0) 推荐(0)
摘要:【思路】 多个起点同时四周扩展广搜,注意会爆int 【AC】 阅读全文
posted @ 2018-06-17 17:29 shulin15 阅读(306) 评论(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 阅读(144) 评论(0) 推荐(0)
摘要:【AC】 阅读全文
posted @ 2018-06-17 15:14 shulin15 阅读(154) 评论(0) 推荐(0)
摘要:80分,暂时没找出20分的Bug 阅读全文
posted @ 2018-06-17 15:11 shulin15 阅读(264) 评论(0) 推荐(0)
摘要:【题意】 给定一个有向图,问图中互相可达(强连通)的点有多少对 【AC】 强连通缩点,缩点后是一个DAG,所以互相可达的点只在强连通块里。 阅读全文
posted @ 2018-06-17 12:18 shulin15 阅读(169) 评论(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 阅读(149) 评论(0) 推荐(0)
摘要:【题意】 给定有n个点,m条边的无向图,没有平行边和自环,求从1到n的路径中,最长段的最小值(最短路不再是路径和,而是所有段中的最大值) 【AC】 阅读全文
posted @ 2018-06-16 16:32 shulin15 阅读(162) 评论(0) 推荐(0)
摘要:去重!不然有环就直接挂掉了...0分 阅读全文
posted @ 2018-06-16 16:01 shulin15 阅读(169) 评论(0) 推荐(0)
摘要:【AC】 阅读全文
posted @ 2018-06-16 15:18 shulin15 阅读(255) 评论(0) 推荐(0)

1 2 3 4 5 ··· 11 下一页