P3387 【模板】缩点 静下心来去看 其实真的很好理解 突然搞不懂我之前为什么死活都看不懂 参悟了学长的代码还有BYVoid的讲解 放一下BYVoid大佬的tarjan伪代码 帮助理解 还有各种变量的含义 (from黄学长 栈里的元素表示的是当前已经访问过但是没有被归类到任一强连通分量的结点dfn ...
分类:
其他好文 时间:
2019-06-12 11:11:34
阅读次数:
108
原题地址 又学会了骂人的新词语。 代码实现如下: #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (register int i = (a); i <= (b); i++) const int maxn = ...
分类:
其他好文 时间:
2019-06-11 20:48:17
阅读次数:
140
1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxn=1e3+5; 4 const int mod=1e9+7; 5 int n,m,mark; 6 char l[maxn],r[maxn]; 7 int numl,num ...
分类:
其他好文 时间:
2019-06-11 11:24:48
阅读次数:
79
Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many p ...
分类:
其他好文 时间:
2019-06-10 11:52:10
阅读次数:
85
"嘟嘟嘟" 这种复杂的概率大题我果然是每做出来…… 然后我找到了一篇极棒的题解,小学生都能看懂(大佬就是大佬啊): "题解 P4284 【[SHOI2014]概率充电器】" ,第二次dp的状态方程真的很妙啊。 刚开始我总按照套路想设$dp[u]$表示$u$的子树的期望,看完题解后发现这是没有依据的, ...
分类:
其他好文 时间:
2019-06-09 11:20:30
阅读次数:
91
#include <stdio.h>#include<string.h>#include<stdlib.h> struct Student{ long num; float score; struct Student* next;};int n; struct Student* creat(void ...
分类:
其他好文 时间:
2019-06-09 09:48:24
阅读次数:
148
https://hihocoder.com/problemset/problem/1175 主要是要明白拓扑排序的概念,就是找出满足用有向图表示的偏序关系的全序关系,知道这一点之后,直接模拟即可。不断寻找入度为0的点加进来,把相邻的点入度减一。重复到无法添加。 ...
分类:
编程语言 时间:
2019-06-08 17:34:22
阅读次数:
111
``` bool isprime[80000]; memset(isprime,1,sizeof(isprime)); isprime[0]=isprime[1]=false; for(int i=4;i ...
分类:
其他好文 时间:
2019-06-08 11:56:20
阅读次数:
91
# 这一章节全部是C语言的内容# 数据类型提高**注意**1.数组作为形参会退化为指针(验证,传参后用sizeof进行打印,可以看出打印出数组的字节为一字节)2.形参在函数上和函数内是一样的,只不过对外开放 # 内存四区 ##### 数组和数组元素指针```void main(){ int a;// ...
分类:
编程语言 时间:
2019-06-08 00:35:09
阅读次数:
137