摘要:
cpp ///E include define lson rt 1; if(c 1; if(c cpp ///F ///AC: include define lson rt pii; const int MXN = 1e5 + 5; const int mod = 1000000007; int n 阅读全文
摘要:
2018ACM ICPC南京现场赛D题 Country Meow Problem D. Country Meow Input file: standard input Output file: standard output In the 24th century, there is a count 阅读全文
摘要:
https://www.topcoder.com/community/competitive programming/tutorials/range minimum query and lowest common ancestor/ https://www.topcoder.com/communit 阅读全文
摘要:
``` include include include include include include include define fi first define se second using namespace std; typedef long long LL; typedef pair p 阅读全文
摘要:
struct fastio{ char s[100005]; int it,len; fastio(){it=len=0;} inline char get(){ if(it<len)return s[it++];it=0; len=fread(s,1,100000,stdin); if(len== 阅读全文
摘要:
const int MXN = 1e6 + 5; const int mod = 1e9 + 7; int n, m; int fa[MXN], idx[MXN], vis[MXN]; std::vector mp[MXN]; int mmax; int dfs(int u,int ba) { in 阅读全文
摘要:
(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 Catalog [TOC] Problem:传送门 "Portal" 原题目描述在最下面。 给你两个二维矩阵,问第一个矩阵在第二个矩阵中的出现次数。 Solution: 二维hash: 直接二维矩阵h 阅读全文
摘要:
(有任何问题欢迎留言或私聊 && 欢迎交流讨论哦 Catalog [TOC] Problem:传送门 "Portal" 原题目描述在最下面。 给你n个点,m组边: a, b ,c ,d ,w.表示点[a,b]与点[c,d]有一条权值为w的无向边。求1 n的最短路 阅读全文
摘要:
"传送门" n个节点且固定起点最短路,三种加边方法 1.u v, 边权为w;2. u [l, r], 边权为w;3. [l, r] u, 边权为w AC_Code Problem Description 阅读全文
摘要:
二分图及其相关定义 [TOC] 二分图相关定义: 二分图的判定: 只需判定图是否有奇环即可,若无奇环则为二分图。判定方法有染色法,并查集(拆点)等。 边覆盖集: 选出某些边集合,满足G中所有点都是边集合中某条边的端点。注意极小的最小的区别。极小边覆盖集的任何真子集都不是边覆盖集。 最小路径覆盖和最小 阅读全文