From: ouuan Date: Tue, 8 Oct 2019 02:35:10 +0000 (+0800) Subject: :sparkles: replace luogu links with loj X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=cc9662561ee0723d6cfcb67b7966c030f9fed236;p=oi-wiki%2Fmain.git :sparkles: replace luogu links with loj --- diff --git a/docs/basic/greedy.md b/docs/basic/greedy.md index 3a4632d9..1034c0bb 100644 --- a/docs/basic/greedy.md +++ b/docs/basic/greedy.md @@ -86,7 +86,6 @@ struct uv { }; ``` -~~看上去是不是很简单呢(这题高精度卡常……)~~ 如果看懂了就可以尝试下一道类似的题: [Luogu P2123 皇后游戏](https://www.luogu.org/problemnew/show/P2123) ## 后悔法 diff --git a/docs/dp/interval.md b/docs/dp/interval.md index abe1818b..e52bb1c6 100644 --- a/docs/dp/interval.md +++ b/docs/dp/interval.md @@ -10,7 +10,7 @@ **求解** :对整个问题设最优值,枚举合并点,将问题分解为左右两个部分,最后合并两个部分的最优值得到原问题的最优值。 -??? note " 例题[「NOI1995」石子合并](https://www.luogu.org/problemnew/show/P1880)" +??? note " 例题[「NOI1995」石子合并](https://loj.ac/problem/10147)" 题目大意:在一个环上有 $n$ 个数 $a_1,a_2,...,a_n$ ,进行 $n-1$ 次合并操作,每次操作将相邻的两堆合并成一堆,能获得新的一堆中的石子数量的和的得分。你需要最大化你的得分。 考虑不在环上,而在一条链上的情况。 diff --git a/docs/dp/state.md b/docs/dp/state.md index 530a4568..b437dfea 100644 --- a/docs/dp/state.md +++ b/docs/dp/state.md @@ -61,10 +61,10 @@ ## 几道练习题 - [NOI2001 炮兵阵地](https://www.luogu.org/problemnew/show/P2704) + [NOI2001 炮兵阵地](https://loj.ac/problem/10173) [「USACO06NOV」玉米田 Corn Fields](https://www.luogu.org/problemnew/show/P1879) [AHOI2009 中国象棋](https://www.luogu.org/problem/P2051) - [九省联考 2018 一双木棋](https://www.luogu.org/problemnew/show/P4363) + [九省联考 2018 一双木棋](https://loj.ac/problem/2471) diff --git a/docs/ds/kdt.md b/docs/ds/kdt.md index b236b64c..85fb6af7 100644 --- a/docs/ds/kdt.md +++ b/docs/ds/kdt.md @@ -157,7 +157,7 @@ k-D Tree 具有二叉搜索树的形态,二叉搜索树上的每个结点都 } ``` -???+note " 例题[「CQOI2016」K 远点对](https://www.luogu.org/problem/P4357)" +???+note " 例题[「CQOI2016」K 远点对](https://loj.ac/problem/2043)" 给定平面上的 $n$ 个点 $(x_i,y_i)$ ,求欧几里得距离下的第 $k$ 远无序点对之间的距离。 $n\le 100000 , 1\le k\le 100 , 0\le x_i,y_i<2^{31}$ diff --git a/docs/ds/lct.md b/docs/ds/lct.md index d0079288..ebfe4097 100644 --- a/docs/ds/lct.md +++ b/docs/ds/lct.md @@ -551,7 +551,7 @@ LCT 通过 `Split(x,y)` 操作,可以将树上从点 $x$ 到点 $y$ 的路径 - [luogu P3690【模板】Link Cut Tree(动态树)](https://www.luogu.org/problemnew/show/P3690) - [「SDOI2011」染色](https://www.luogu.org/problemnew/show/P2486) -- [「SHOI2014」三叉神经树](https://www.luogu.org/problemnew/show/P4332) +- [「SHOI2014」三叉神经树](https://loj.ac/problem/2187) ## 维护连通性质 @@ -982,14 +982,14 @@ LCT 上没有固定的父子关系,所以不能将边权记录在点权中。 ### 习题 - [「WC2006」水管局长](https://www.luogu.org/problem/P4172) -- [「BJWC2010」](https://www.luogu.org/problemnew/show/P4180) +- [「BJWC2010」严格次小生成树](https://www.luogu.org/problemnew/show/P4180) - [「NOI2014」魔法森林](http://uoj.ac/problem/3) ## 维护子树信息 LCT 不擅长维护子树信息。统计一个结点所有虚子树的信息,就可以求得整棵树的信息。 -???+note " 例题[「BJOI2014」大融合](https://www.luogu.org/problem/P4219)" +???+note " 例题[「BJOI2014」大融合](https://loj.ac/problem/2230)" 给定 $n$ 个结点和 $q$ 次操作,每个操作为如下形式: 1. `A x y` 在结点 $x$ 和 $y$ 之间连接一条边。 diff --git a/docs/ds/odt.md b/docs/ds/odt.md index 9eb3ee79..34f61ed1 100644 --- a/docs/ds/odt.md +++ b/docs/ds/odt.md @@ -91,6 +91,6 @@ void performance(int l, int r) { ## 习题 - [「SCOI2010」序列操作](https://www.luogu.org/problem/P2572) -- [「SHOI2015」脑洞治疗仪](https://www.luogu.org/problem/P4344) +- [「SHOI2015」脑洞治疗仪](https://loj.ac/problem/2037) - [「Luogu 2787」理理思维](https://www.luogu.org/problemnew/show/P2787) - [「Luogu 4979」矿洞:坍塌](https://www.luogu.org/problemnew/show/P4979) diff --git a/docs/ds/sparse-table.md b/docs/ds/sparse-table.md index d5cfe6fd..5d14220c 100644 --- a/docs/ds/sparse-table.md +++ b/docs/ds/sparse-table.md @@ -117,6 +117,6 @@ ST 表能较好的维护区间信息,时间复杂度较低,代码量相对 [严格次小生成树](https://www.luogu.org/problemnew/show/P4180) - [货车运输](https://www.luogu.org/problemnew/show/P1967) + [货车运输](https://loj.ac/problem/2610) [跑路](https://www.luogu.org/problemnew/show/P1613) diff --git a/docs/graph/lca.md b/docs/graph/lca.md index d9e8e451..4102962b 100644 --- a/docs/graph/lca.md +++ b/docs/graph/lca.md @@ -458,5 +458,5 @@ int main() { ## 习题 - [严格次小生成树](https://www.luogu.org/problemnew/show/P4180) -- [货车运输](https://www.luogu.org/problemnew/show/P1967) +- [货车运输](https://loj.ac/problem/2610) - [跑路](https://www.luogu.org/problemnew/show/P1613) diff --git a/docs/math/bignum.md b/docs/math/bignum.md index b1924dd5..3bfa56ab 100644 --- a/docs/math/bignum.md +++ b/docs/math/bignum.md @@ -865,7 +865,7 @@ $$ ## 习题 -- [NOIP 2012 国王游戏](https://www.luogu.org/problemnew/show/P1080) +- [NOIP 2012 国王游戏](https://loj.ac/problem/2603) - [SPOJ - Fast Multiplication](http://www.spoj.com/problems/MUL/en/) - [SPOJ - GCD2](http://www.spoj.com/problems/GCD2/) - [UVA - Division](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1024) diff --git a/docs/math/bsgs.md b/docs/math/bsgs.md index a7033fe7..ca432df4 100644 --- a/docs/math/bsgs.md +++ b/docs/math/bsgs.md @@ -189,7 +189,7 @@ $$ - [SPOJ MOD](https://www.spoj.com/problems/MOD/) 模板 - [SDOI2013 随机数生成器](https://www.luogu.org/problem/P3306) - [BZOJ1319 Discrete Roots](http://www.lydsy.com/JudgeOnline/problem.php?id=1319) 模板 -- [SDOI2011 计算器](https://www.luogu.org/problemnew/show/P2485) 模板 +- [SDOI2011 计算器](https://loj.ac/problem/10214) 模板 - [Luogu4195【模板】exBSGS/Spoj3105 Mod](https://www.luogu.org/problemnew/show/P4195) 目标 - [Codeforces - Lunar New Year and a Recursive Sequence](https://codeforces.com/contest/1106/problem/F) diff --git a/docs/math/inverse.md b/docs/math/inverse.md index bbbc321b..0e61f657 100644 --- a/docs/math/inverse.md +++ b/docs/math/inverse.md @@ -120,8 +120,8 @@ for (int i = 1; i <= n; ++i) inv[i] = sv[i] * s[i - 1] % p; [乘法逆元 2](https://loj.ac/problem/152) - [同余方程](https://www.luogu.org/problemnew/show/P1082) + [「NOIP2012」同余方程](https://loj.ac/problem/2605) [「AHOI2005」洗牌](https://www.luogu.org/problem/P2054) - [「SDOI2016」排列计数](https://www.luogu.org/problemnew/show/P4071) + [「SDOI2016」排列计数](https://loj.ac/problem/2034) diff --git a/docs/math/linear-equation.md b/docs/math/linear-equation.md index f9725ef5..d696ed1f 100644 --- a/docs/math/linear-equation.md +++ b/docs/math/linear-equation.md @@ -2,7 +2,7 @@ 形如 $ax \equiv b \pmod c$ 的方程被称为 **线性同余方程** (Congruence Equation)。 - [「NOIP2012」同余方程](https://www.luogu.org/problemnew/show/P1082) + [「NOIP2012」同余方程](https://loj.ac/problem/2605) ## 求解方法 diff --git a/docs/math/lucas.md b/docs/math/lucas.md index 61abd3a6..f6cc8c0a 100644 --- a/docs/math/lucas.md +++ b/docs/math/lucas.md @@ -144,5 +144,5 @@ LL exlucas(LL m, LL n, LL P) { ## 习题 - [Luogu3807【模板】卢卡斯定理](https://www.luogu.org/problemnew/show/P3807) -- [SDOI2010 古代猪文 卢卡斯定理](https://www.luogu.org/problemnew/show/P2480) +- [SDOI2010 古代猪文 卢卡斯定理](https://loj.ac/problem/10229) - [Luogu4720【模板】扩展卢卡斯](https://www.luogu.org/problemnew/show/P4720) diff --git a/docs/math/mobius.md b/docs/math/mobius.md index 6ce5dc6e..4d77fb24 100644 --- a/docs/math/mobius.md +++ b/docs/math/mobius.md @@ -583,7 +583,7 @@ int main() { } ``` -### [「SDOI2015」约数个数和](https://www.luogu.org/problemnew/show/P3327) +### [「SDOI2015」约数个数和](https://loj.ac/problem/2185) 多组数据,求 diff --git a/docs/math/quick-pow.md b/docs/math/quick-pow.md index 07a31dcc..d5ef6746 100644 --- a/docs/math/quick-pow.md +++ b/docs/math/quick-pow.md @@ -77,8 +77,7 @@ long long binpow(long long a, long long b) { } ``` -??? note "例题" - 做一做 [Luogu P1226](https://www.luogu.org/problemnew/show/P1226) +模板:[Luogu P1226](https://www.luogu.org/problemnew/show/P1226) ## 应用 diff --git a/docs/misc/frac-programming.md b/docs/misc/frac-programming.md index 7a559cbd..f1e32be4 100644 --- a/docs/misc/frac-programming.md +++ b/docs/misc/frac-programming.md @@ -207,6 +207,6 @@ inline bool check(double mid) { //如果有负环返回 true ## 习题 -- [JSOI2016 最佳团体](https://www.luogu.org/problem/P4322) -- [SDOI2017 新生舞会](https://www.luogu.org/problem/P3705) +- [JSOI2016 最佳团体](https://loj.ac/problem/2071) +- [SDOI2017 新生舞会](https://loj.ac/problem/2003) - [UVa1389 Hard Life](https://www.luogu.org/problem/UVA1389) diff --git a/docs/search/index.md b/docs/search/index.md index c20610dc..95f2d3e5 100644 --- a/docs/search/index.md +++ b/docs/search/index.md @@ -46,7 +46,7 @@ 所谓 **meet-in-middle** , 就是让 DFS 的状态在中间的时候碰面。我们知道,如果一个暴力 dfs 有 $K$ 个转移,那么它的时间复杂度(大多数情况)是 $O(K^N)$ 的。那我们就想,当 $N$ 到达一定程度时,TLE 会变成必然。 -例题 [Luogu P2962](https://www.luogu.org/problemnew/show/P2962) +例题 [「USACO09NOV」灯Lights](https://www.luogu.org/problemnew/show/P2962) 我们正常想,如果这道题暴力 DFS 找开关灯的状态,时间复杂度就是 $O(2^{n})$ , 显然超时。不过,如果我们用 **meet-in-middle** 的话,时间复杂度将会变为 $O(2^{n/2} \times 2)$ 而已。 **meet-in-middle** 就是让我们先找一半的状态,也就是 $1$ 到 $\mathrm{mid}$ 的状态,再找剩下的状态就可以了。我们把前半段的状态全部存储在 `map` 里面,然后在找后半段的状态的时候,先判断后半段是不是都合法,就可以判断上半段有没有配对的上半段使得整段合法。 diff --git a/docs/string/seq-automaton.md b/docs/string/seq-automaton.md index 3a2141c7..a5e615f5 100644 --- a/docs/string/seq-automaton.md +++ b/docs/string/seq-automaton.md @@ -45,7 +45,7 @@ $$ ## 例题 -???+note "[「HEOI2015」最短不公共子串](https://www.luogu.org/problem/P4112)" +???+note "[「HEOI2015」最短不公共子串](https://loj.ac/problem/2123)" 给你两个由小写英文字母组成的串 $A$ 和 $B$,求: