摘要:
``` include include include include include include include include using namespace std; const int maxn = 10000 + 10; char s[maxn]; int sa[maxn], t[ma 阅读全文
摘要:
``` include include include include include include include include using namespace std; const int maxn = 1000 + 10; int s[100 maxn]; int sa[100 maxn] 阅读全文
摘要:
题意:公司里有员工,员工的上司,员工上司的上司...给一个人分配工作,他的直接员工和间接员工都会停下手中的工作一起去做的他的工作,问指定的一个人现在在做的工作。 dfs时间戳处理出每一个人对应的工作时间范围,类比成某个人管辖的区间。dfs序已经将每个人编号,所以区间的最左侧即为这个人自己。然后就将区 阅读全文