1 #include <iostream> 2 #define black 'f' 3 #define white 'e' 4 #define grey 'p' 5 using namespace std; 6 struct node{ 7 char type; 8 node* upper_r; 9 ...
分类:
其他好文 时间:
2020-03-21 16:25:21
阅读次数:
64
AC 自动机 1. Dominating Patterns "UVA 1449" 给N个串,然后再给一个串s,求N个串总共在S中出现了多少次 将N个串插入到AC自动机当中,如果某个结点为模式串末尾结点,则在fail树中,以该节点为祖先的所有结点,贡献都+1 然后直接暴力匹配即可,最后倒着去算一遍贡献 ...
分类:
其他好文 时间:
2020-03-20 17:07:34
阅读次数:
84
题目链接:https://vjudge.net/problem/UVA-514 思路: 用两个指针 A , B 分别表示 ' 理论上驶出车站的车厢 ' 、 ' 实际上驶出车站的车厢 ' 用循环、栈模拟 (是的这就是刘哥的代码) 1 #include <cstdio> 2 #include <stac ...
分类:
其他好文 时间:
2020-03-18 20:21:20
阅读次数:
78
参考博客https://blog.csdn.net/qq_26572969/article/details/47155559 ...
分类:
其他好文 时间:
2020-03-18 18:37:27
阅读次数:
57
记录一下这几天刷的后缀自动机的题目 "Glass Beads UVA 719" 求 $S$ 循环同构的最小表示 将 $S$ copy 成 $SS$ 后建出后缀自动机,按字典序走 $n$ 步即可 代码 "Longest Common Substring SPOJ LCS" 求两个串的最长公共子串 对第 ...
分类:
其他好文 时间:
2020-03-17 19:45:45
阅读次数:
76
import com.jacob.activeX.ActiveXComponent;import com.jacob.com.Dispatch;import com.jacob.com.Variant; public class ExcelToPdf { public static void exc ...
分类:
编程语言 时间:
2020-03-16 17:43:40
阅读次数:
87
Problem Description WhereIsHeroFrom: Zty, what are you doing ?Zty: I want to calculate N!......WhereIsHeroFrom: So easy! How big N is ?Zty: 1 <=N <=10 ...
分类:
其他好文 时间:
2020-03-14 23:37:48
阅读次数:
74
$ vue init webpack myweb Command vue init requires a global addon to be installed. Please run npm install g @vue/cli init and try again. $ npm install ...
分类:
其他好文 时间:
2020-03-14 10:55:50
阅读次数:
289
可以ping通,但是无法ssh连接 service iptables stop service sshd startsudo ufw statussudo ufw disablesudo ufw allow 22 ssh时permission denied, please try again 找到/ ...
分类:
其他好文 时间:
2020-03-10 22:09:00
阅读次数:
88
| 逻辑运算 | 规则 | 符号 | | : : | : : | | | 与 | 只有1 and 1 = 1,其他均为0 | & | | 或 | 只有0 or 0 = 0,其他均为1 | \| | | 非 | 也就是取反 | ~ | | 异或 | 相异为1相同为0 | ^ | | 同或 | 相同为1 ...
分类:
其他好文 时间:
2020-03-07 12:38:32
阅读次数:
76