摘要: 判定 染色法 bool dfs(int x, int color) { v[x] = color; for (unsigned int i = 0; i < e[x].size(); i++) { int y = e[x][i].first; if (v[y]) { if (v[y] == colo 阅读全文
posted @ 2020-04-18 09:31 人生有味是清欢 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Dijkstra+堆优化 不带小根堆 #include<bits/stdc++.h> using namespace std; const int maxn=2505; #define INF 1e9 vector<pair<int,int> >e[maxn]; int d[maxn]; void 阅读全文
posted @ 2020-04-17 15:46 人生有味是清欢 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 吾一生有三爱 一爱·清欢 少年时代读到苏轼的一厥词,非常喜欢,到现在还能背诵: 细雨斜风作小寒, 淡烟疏柳媚晴滩. 入淮清洛渐漫漫, 雪沫乳花浮午盏. 蓼茸蒿笋试春盘, 人间有味是清欢. 这厥词,苏轼在旁边写着"元丰七年十一月二十四日,从泗州刘倩叔游南山",原来是苏 轼和朋友到郊外去玩,在南山里喝了 阅读全文
posted @ 2020-04-17 12:53 人生有味是清欢 阅读(397) 评论(1) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2020-04-17 12:51 人生有味是清欢 阅读(0) 评论(0) 推荐(0) 编辑
摘要: https://guides.github.com/activities/hello-world/ 阅读全文
posted @ 2020-04-15 14:44 人生有味是清欢 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 好吧,实际上好多我也不会 质数 bool is_prime(int n) { if(n<2) return flase; for(int i=2;i<=sqrt(n);i++) if(n%i==0) return flase; return true; } 质数筛 基本上用欧式晒 void prim 阅读全文
posted @ 2020-10-03 10:24 人生有味是清欢 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1.DFS AcWing 165. 小猫爬山 挺经典水的DFS; 题目 #include<bits/stdc++.h> using namespace std; inline long long read(){ long long num=0;int z=1;char c=getchar(); if 阅读全文
posted @ 2020-10-01 17:34 人生有味是清欢 阅读(170) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_21997625/article/details/84672775 阅读全文
posted @ 2020-08-29 14:38 人生有味是清欢 阅读(196) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/m0_37809890/article/details/83109136 阅读全文
posted @ 2020-08-23 12:43 人生有味是清欢 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; inline long long read(){ long long num=0;int z=1;char c=getchar(); if(c=='-') z=-1; while((c<'0'||c>'9')& 阅读全文
posted @ 2020-08-10 08:31 人生有味是清欢 阅读(176) 评论(0) 推荐(0) 编辑
摘要: LCA+树上差分 #include <bits/stdc++.h> using namespace std; #define maxn 50010 #define ll long long #define res register int struct Node{ int to,next; }; N 阅读全文
posted @ 2020-08-03 09:52 人生有味是清欢 阅读(127) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/daybreaking/p/9408301.html 阅读全文
posted @ 2020-07-31 08:56 人生有味是清欢 阅读(203) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/stxy-ferryman/p/7741970.html 阅读全文
posted @ 2020-07-30 20:14 人生有味是清欢 阅读(92) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_44205848/article/details/87929234 阅读全文
posted @ 2020-07-30 15:44 人生有味是清欢 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; int main(){ char a[400]; cin>>a; int n=strlen(a); int ans=0; for(int i=0;i<n;i++) { if(a[i]!=i+97){ break 阅读全文
posted @ 2020-07-25 19:46 人生有味是清欢 阅读(161) 评论(0) 推荐(0) 编辑