Skip to content

Commit

Permalink
feat: add build script
Browse files Browse the repository at this point in the history
  • Loading branch information
upupming committed Jul 22, 2022
1 parent 8db7dfe commit 3a2bab6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ out
*.pdf
*_input.txt
*_output.txt
build
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"repository": "[email protected]:upupming/algorithm.git",
"author": "<[email protected]>",
"license": "MIT",
"scripts": {
"pdf": "mkdir -p build && pandoc --pdf-engine=xelatex template.md -o build/template.pdf && pandoc --pdf-engine=xelatex template-typescript.md -o build/template-typescript.pdf"
},
"devDependencies": {
"@types/lodash": "4.14.169",
"@types/node": "15.0.3",
Expand Down
12 changes: 12 additions & 0 deletions template-typescript.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
---
papersize: a4
documentclass:
- ctexart
geometry: margin=2cm
header-includes:
- \usepackage{fvextra}
- \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,commandchars=\\\{\}}
- \usepackage{setspace}
- \singlespacing
---

# 算法模板(JS/TS 版本)

> 为了训练自己的 JavaScript/TypeScript 编程能力,能用 TS 写的地方尽量用,不行再换 C++
Expand Down
2 changes: 1 addition & 1 deletion template.md
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ if (getHash(l1, r1) == getHash(l2, r2)) {
// p[i]表示 Str 中以下标i为回文中心的最大回文半径。
// 如果我们得到了p[i],那么p[i] - 1就是原串 S 以i为回文中心的最大回文长度
// rt表示已经计算过的回文串能达到的最远右边界的下一个位置,mid表示rt所对应的最左侧的回文中心
// rt=max(j+p[j]),j[1,i−1]
// rt=max(j+p[j]),j \in [1,i−1]
// mid + p[mid] == rt
int manacher() {
Expand Down

0 comments on commit 3a2bab6

Please sign in to comment.