摘要: 模版题 https://www.luogu.org/problemnew/show/P3379 讲解 https://www.bilibili.com/video/av41067872/?p=4&t=1591 阅读全文
posted @ 2019-05-15 19:32 企鹅君 阅读(89) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 #define _ 0 4 const int maxn = 2e5+5; 5 vectorE[maxn]; 6 int dfn[maxn],low[maxn],tot,n,m,vis[maxn],ans=maxn; 7 stacks; 8 void tarjan(int x){ 9 low[x]... 阅读全文
posted @ 2019-05-15 19:11 企鹅君 阅读(112) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 const int maxn = 3e5; 4 char s[maxn], str[maxn]; 5 int len1, len2, p[maxn], ans; 6 7 void init(){ 8 str[0] = '$'; 9 str[1] = '#'; 10 for(... 阅读全文
posted @ 2019-05-15 19:08 企鹅君 阅读(153) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #pragma comment(lib, "Urlmon.lib") 4 int WINAPI _tWinMain(HINSTANCE hInstace, HINSTANCE hPreInstance, LPTSTR lpCmdLine, INT nShowCmd) 5 { 6 //MessageBox(NULL, _T("... 阅读全文
posted @ 2019-05-15 19:06 企鹅君 阅读(173) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 #define MAX_N 1000006 10 #define MAX_Tot 500005 11 12 struct ACo{ 13 struct state{ 14... 阅读全文
posted @ 2019-05-15 19:05 企鹅君 阅读(75) 评论(0) 推荐(0)
摘要: 1 #include 2 3 typedef char* String; 4 5 void getnext(String T, int *next) 6 { 7 j=0, i=1; 8 next[1] = 0; 9 while ( i T[0]) 56 { 57 return i - T[0]; 58 } 59 ... 阅读全文
posted @ 2019-05-15 18:59 企鹅君 阅读(125) 评论(0) 推荐(0)
摘要: 大概:给n个点 每两点都有连线 求线段相交的次数 相交斜率一定不同 (斜率相同的条数)*(其他的) 就是于其他相交的次数 总数就/2 阅读全文
posted @ 2019-05-12 17:03 企鹅君 阅读(287) 评论(0) 推荐(0)
摘要: #define MAXVEX 9; #define INFINITY 65535; typedef int Pathmatirx[MAXVEX][MAXVEX]; typedef int ShortPathTable[MAXVEX][MAXVEX]; void ShortesPath_Floyd(MGraph G, Pathmatirx *P, ShortPathTable *D){ ... 阅读全文
posted @ 2018-12-05 13:05 企鹅君 阅读(207) 评论(0) 推荐(0)
摘要: #define MAXVEX 9; #define INFINITY 65535; typedef int Patharc[MAXVEX]; //用于存储最短路径下标的数组 typedef int ShortPathTable[MAXVEX]; //用于存储到各点最短路径的权值和 void ShortesPath_Dijkstar(MGra... 阅读全文
posted @ 2018-12-05 12:04 企鹅君 阅读(597) 评论(0) 推荐(0)
摘要: #include #include typedef struct Bitnode { int val; struct Bitnode *left; struct Bitnode *right; }Bitnode; Bitnode *CreatBitree_level() { int front = 1, rear = 0, x; struct Bitno... 阅读全文
posted @ 2018-11-20 21:27 企鹅君 阅读(182) 评论(0) 推荐(0)