fix: 将“UVA”统一为"UVa" (#5408)

mgt/lxgw
gi-b716 2024-02-15 22:17:29 +08:00 committed by GitHub
parent 4d9864beb7
commit 86dd0a85dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 41 additions and 41 deletions

View File

@ -7,7 +7,7 @@ author: countercurrent-time, StudyingFather
交互题的特殊错误:
- 选手每一次输出后都需要刷新缓冲区,否则会引起 Idleness limit exceeded 错误。另外,如果题目含多组数据并且程序可以在未读入所有数据前就知道答案,也仍然要读入所有数据,否则同样会因为读入混乱引起 ILE可以一次提出多次询问一次接收所有询问的回答。同时尽量不要使用快读。
- 如果程序查询次数过多,则在 Codeforces 上会给出 Wrong Answer 的评测结果(不过评测系统会说明 Wrong Answer 的原因),而 UVA 会给出 Protocol Limit Exceeded (PLE) 的评测结果。
- 如果程序查询次数过多,则在 Codeforces 上会给出 Wrong Answer 的评测结果(不过评测系统会说明 Wrong Answer 的原因),而 UVa 会给出 Protocol Limit Exceeded (PLE) 的评测结果。
- 如果程序交互格式错误UVa 会给出 Protocol Violation (PV) 的评测结果。
由于交互题输入输出较为繁琐,所以建议分别封装输入和输出函数。
@ -20,7 +20,7 @@ author: countercurrent-time, StudyingFather
- [CF843B Interactive LowerBound](https://www.luogu.com.cn/problem/CF843B)
- [UOJ206\[APIO2016\]Gap](http://uoj.ac/problem/206)
- [CF750F New Year and Finding Roots](https://www.luogu.com.cn/problem/CF750F)
- [UVA12731 太空站之谜 Mysterious Space Station](https://www.luogu.com.cn/problem/UVA12731)
- [UVa12731 太空站之谜 Mysterious Space Station](https://www.luogu.com.cn/problem/UVA12731)
## CF679A Bear and Prime 100
@ -278,7 +278,7 @@ $h \le 4$ 时可以直接暴力枚举。然而 $h > 4$ 时需要很高效的遍
}
```
## UVA12731 太空站之谜 Mysterious Space Station
## UVa12731 太空站之谜 Mysterious Space Station
由于唯一的反馈是移动时是否撞墙,所以我们应该考虑在机器人不走丢的情况下,尽量接近墙边走路,这样有几个好处:

View File

@ -355,9 +355,9 @@ if (s >> j & 1) { // 如果已被覆盖
除了路径模型之外,还有一类常见的模型,需要我们对棋盘进行染色,相邻的相同颜色节点被视为连通。在路径类问题中,状态转移的时候我们枚举当前路径的方向,而在染色类问题中,我们枚举当前节点染何种颜色。在染色模型中,状态中处在相同连通性的节点可能不止两个。但总体来说依然大同小异。我们不妨来看一个经典的例题。
### 例题「UVA 10572」Black & White
### 例题「UVa 10572」Black & White
???+ note " 例题 [「UVA 10572」Black & White](https://vjudge.net/problem/UVA-10572)"
???+ note " 例题 [「UVa 10572」Black & White](https://vjudge.net/problem/UVA-10572)"
题目大意:在 $N\times M$ 的棋盘内对未染色的格点进行黑白染色,要求所有黑色区域和白色区域连通,且任意一个 $2\times 2$ 的子矩形内的颜色不能完全相同(例如下图中的情况非法),求合法的方案数,并构造一组合法的方案。
![black\_and\_white1](./images/black_and_white1.svg)
@ -585,7 +585,7 @@ if (s >> j & 1) { // 如果已被覆盖
![greatwall](./images/greatwall.svg)
在本题中,如果视作染色模型的话,不仅需要额外讨论染色区域的周长,还要判断在角上触碰而导致不合法的情况(图 2。另外与 [「UVA 10572」Black & White](https://vjudge.net/problem/UVA-10572) 不同的是,本题中要求围墙为简单多边形,因而对于下面的回字形的情况,在本题中是不合法的。
在本题中,如果视作染色模型的话,不仅需要额外讨论染色区域的周长,还要判断在角上触碰而导致不合法的情况(图 2。另外与 [「UVa 10572」Black & White](https://vjudge.net/problem/UVA-10572) 不同的是,本题中要求围墙为简单多边形,因而对于下面的回字形的情况,在本题中是不合法的。
3 3
ooo
@ -773,7 +773,7 @@ if (s >> j & 1) { // 如果已被覆盖
??? note " 习题 [「HDU 3958」Tower Defence](https://vjudge.net/problem/HDU-3958)"
题目大意:可以转化为求解一条从 $\mathit{S}$ 到 $\mathit{T}$ 的不能接触的最长路径,拐角处可以接触。
??? note " 习题 [「UVA 10531」Maze Statistics](https://vjudge.net/problem/UVA-10531)"
??? note " 习题 [「UVa 10531」Maze Statistics](https://vjudge.net/problem/UVA-10531)"
题目大意:有一个 $N\times M$ 的图,每个格子有独立概率 $\mathit{p}$ 变成障碍物。你要从迷宫左上角走到迷宫右下角。求每个格子成为一个 **有解迷宫(即起点终点四联通)** 中的障碍物的概率。($N \le 5$$M \le 6$
??? note " 习题 [「AIZU 2452」Pipeline Plans](https://vjudge.net/problem/Aizu-2452)"

View File

@ -93,8 +93,8 @@ $T=\sqrt{n}$ 时,总复杂度 $O(m \sqrt{n})$。
## 练习题
- [UVA - 12003 - Array Transformer](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3154)
- [UVA - 11990 Dynamic Inversion](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3141)
- [UVa - 12003 - Array Transformer](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3154)
- [UVa - 11990 Dynamic Inversion](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3141)
- [SPOJ - Give Away](http://www.spoj.com/problems/GIVEAWAY/)
- [Codeforces - Till I Collapse](http://codeforces.com/contest/786/problem/C)
- [Codeforces - Destiny](http://codeforces.com/contest/840/problem/D)

View File

@ -229,7 +229,7 @@ $A(m, n) = \begin{cases}n+1&\text{if }m=0\\A(m-1,1)&\text{if }m>0\text{ and }n=0
## 例题
???+ note "[UVA11987 Almost Union-Find](https://www.luogu.com.cn/problem/UVA11987)"
???+ note "[UVa11987 Almost Union-Find](https://www.luogu.com.cn/problem/UVA11987)"
实现类似并查集的数据结构,支持以下操作:
1. 合并两个元素所属集合

View File

@ -199,7 +199,7 @@ $$
## 练习
- [UVA11626 Convex Hull](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2673)
- [UVa11626 Convex Hull](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2673)
- [「USACO5.1」圈奶牛 Fencing the Cows](https://www.luogu.com.cn/problem/P2742)

View File

@ -229,7 +229,7 @@ $$
## 习题
- [UVA 10245 "The Closest Pair Problem"\[难度:低\]](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1186)
- [UVa 10245 "The Closest Pair Problem"\[难度:低\]](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1186)
- [SPOJ #8725 CLOPPAIR "Closest Point Pair"\[难度:低\]](https://www.spoj.com/problems/CLOPPAIR/)
- [CODEFORCES Team Olympiad Saratov - 2011 "Minimum amount"\[难度:中\]](http://codeforces.com/contest/120/problem/J)
- [SPOJ #7029 CLOSEST "Closest Triple"\[难度:中\]](https://www.spoj.com/problems/CLOSEST/)

View File

@ -324,7 +324,7 @@ $$
## 习题
- [UVA #10843 - Anne's game](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1784)
- [UVa #10843 - Anne's game](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1784)
- [Timus #1069 - Prufer Code](http://acm.timus.ru/problem.aspx?space=1&num=1069)
- [Codeforces - Clues](http://codeforces.com/contest/156/problem/D)
- [Topcoder - TheCitiesAndRoadsDivTwo](https://community.topcoder.com/stat?c=problem_statement&pm=10774&rd=14146)

View File

@ -78,7 +78,7 @@ STL 提供了大约 100 个实现算法的模版函数,基本都包含在 `<al
partial_sum(src.begin(), src.end(), back_inserter(dst));
for (unsigned int i = 0; i < dst.size(); i++) cout << dst[i] << " ";
```
- 使用 `lower_bound` 查找有序数组 $a$ 中最接近 $x$ 的元素。例题:[UVA10487 Closest Sums](https://www.luogu.com.cn/problem/UVA10487)
- 使用 `lower_bound` 查找有序数组 $a$ 中最接近 $x$ 的元素。例题:[UVa10487 Closest Sums](https://www.luogu.com.cn/problem/UVA10487)
???+ note "实现"
```cpp

View File

@ -1015,8 +1015,8 @@ $$
- [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)
- [UVA - Fibonacci Freeze](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=436)
- [UVa - Division](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1024)
- [UVa - Fibonacci Freeze](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=436)
- [Codeforces - Notepad](http://codeforces.com/contest/17/problem/D)
## 参考资料与链接

View File

@ -174,7 +174,7 @@ $$
## 习题
1. [SPOJ #4141 "Euler Totient Function"\[Difficulty: CakeWalk\]](http://www.spoj.com/problems/ETF/)
2. [UVA #10179 "Irreducible Basic Fractions"\[Difficulty: Easy\]](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1120)
3. [UVA #10299 "Relatives"\[Difficulty: Easy\]](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1240)
4. [UVA #11327 "Enumerating Rational Numbers"\[Difficulty: Medium\]](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2302)
2. [UVa #10179 "Irreducible Basic Fractions"\[Difficulty: Easy\]](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1120)
3. [UVa #10299 "Relatives"\[Difficulty: Easy\]](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1240)
4. [UVa #11327 "Enumerating Rational Numbers"\[Difficulty: Medium\]](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2302)
5. [TIMUS #1673 "Admission to Exam"\[Difficulty: High\]](http://acm.timus.ru/problem.aspx?space=1&num=1673)

View File

@ -453,4 +453,4 @@ int exgcd(int a, int b, int &x, int &y) {
- [10104 - Euclid Problem](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1045)
- [GYM - (J) once upon a time](http://codeforces.com/gym/100963)
- [UVA - 12775 - Gift Dilemma](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4628)
- [UVa - 12775 - Gift Dilemma](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4628)

View File

@ -38,7 +38,7 @@ author: mwsht, sshwy, ouuan, Ir1d, Henry-ZHR, hsfzLZH1
--8<-- "docs/misc/code/hoverline/hoverline_1.cpp"
```
???+ note "[UVA1619 感觉不错 Feel Good](https://www.luogu.com.cn/problem/UVA1619)"
???+ note "[UVa1619 感觉不错 Feel Good](https://www.luogu.com.cn/problem/UVA1619)"
对于一个长度为 $n$ 的数列,找出一个子区间,使子区间内的最小值与子区间长度的乘积最大,要求在满足舒适值最大的情况下最小化长度,最小化长度的情况下最小化左端点序号。
本题中我们可以考虑枚举最小值,将每个位置的数 $a_i$ 当作最小值,并考虑从 $i$ 向左右扩展,找到满足 $\min\limits _ {j = l} ^ r a_j = a_i$ 的尽可能向左右扩展的区间 $[l, r]$。这样本题就被转化成了悬线法模型。

View File

@ -456,12 +456,12 @@ $$
## 练习题目
- [UVA 455 "Periodic Strings"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=396)
- [UVA 11022 "String Factoring"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1963)
- [UVA 11452 "Dancing the Cheeky-Cheeky"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2447)
- [UVA 12604 - Caesar Cipher](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4282)
- [UVA 12467 - Secret Word](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3911)
- [UVA 11019 - Matrix Matcher](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1960)
- [UVa 455 "Periodic Strings"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=396)
- [UVa 11022 "String Factoring"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1963)
- [UVa 11452 "Dancing the Cheeky-Cheeky"](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2447)
- [UVa 12604 - Caesar Cipher](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4282)
- [UVa 12467 - Secret Word](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3911)
- [UVa 11019 - Matrix Matcher](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1960)
- [SPOJ - Pattern Find](http://www.spoj.com/problems/NAJPF/)
- [Codeforces - Anthem of Berland](http://codeforces.com/contest/808/problem/G)
- [Codeforces - MUH and Cube Walls](http://codeforces.com/problemset/problem/471/D)

View File

@ -136,6 +136,6 @@ Duval 算法运用了贪心的思想。算法过程中我们把串 $s$ 分成三
## 习题
- [UVA #719 - Glass Beads](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=660)
- [UVa #719 - Glass Beads](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=660)
**本页面主要译自博文 [Декомпозиция Линдона. Алгоритм Дюваля. Нахождение наименьшего циклического сдвига](http://e-maxx.ru/algo/duval_algorithm) 与其英文翻译版 [Lyndon factorization](https://cp-algorithms.com/string/lyndon_factorization.html)。其中俄文版版权协议为 Public Domain + Leave a Link英文版版权协议为 CC-BY-SA 4.0。**

View File

@ -228,7 +228,7 @@ Manacher 算法的另一部分显然也是线性的,因此总复杂度为 $O(n
## 练习题目
- [UVA #11475 "Extend to Palindrome"](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2470)
- [UVa #11475 "Extend to Palindrome"](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2470)
- [「国家集训队」最长双回文串](https://www.luogu.com.cn/problem/P4555)
***

View File

@ -467,22 +467,22 @@ $\frac{n(n+1)}{2}-\sum\limits_{i=2}^nheight[i]$
- [Codeforces - Little Elephant and Strings](http://codeforces.com/problemset/problem/204/E)
- [SPOJ - Ada and Terramorphing](http://www.spoj.com/problems/ADAPHOTO/)
- [SPOJ - Ada and Substring](http://www.spoj.com/problems/ADASTRNG/)
- [UVA - 1227 - The longest constant gene](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3668)
- [UVa - 1227 - The longest constant gene](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3668)
- [SPOJ - Longest Common Substring](http://www.spoj.com/problems/LCS/en/)
- [UVA 11512 - GATTACA](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2507)
- [UVa 11512 - GATTACA](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2507)
- [LA 7502 - Suffixes and Palindromes](https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=720&page=show_problem&problem=5524)
- [GYM - Por Costel and the Censorship Committee](http://codeforces.com/gym/100923/problem/D)
- [UVA 1254 - Top 10](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3695)
- [UVA 12191 - File Recover](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3343)
- [UVA 12206 - Stammering Aliens](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3358)
- [UVa 1254 - Top 10](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3695)
- [UVa 12191 - File Recover](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3343)
- [UVa 12206 - Stammering Aliens](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3358)
- [Codechef - Jarvis and LCP](https://www.codechef.com/problems/INSQ16F)
- [LA 3943 - Liking's Letter](https://icpcarchive.ecs.baylor.edu/index.php?option=onlinejudge&Itemid=8&page=show_problem&problem=1944)
- [UVA 11107 - Life Forms](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2048)
- [UVA 12974 - Exquisite Strings](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4853)
- [UVA 10526 - Intellectual Property](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1467)
- [UVA 12338 - Anti-Rhyme Pairs](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3760)
- [UVa 11107 - Life Forms](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2048)
- [UVa 12974 - Exquisite Strings](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4853)
- [UVa 10526 - Intellectual Property](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1467)
- [UVa 12338 - Anti-Rhyme Pairs](https://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3760)
- [DevSkills Reconstructing Blue Print of Life](https://devskill.com/CodingProblems/ViewProblem/328)
- [UVA 12191 - File Recover](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3343)
- [UVa 12191 - File Recover](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3343)
- [SPOJ - Suffix Array](http://www.spoj.com/problems/SARRAY/)
- [LA 4513 - Stammering Aliens](https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2514)
- [SPOJ - LCS2](http://www.spoj.com/problems/LCS2/)

View File

@ -155,8 +155,8 @@ Z 函数的朴素算法复杂度为 $O(n^2)$
## 练习题目
- [CF126B Password](http://codeforces.com/problemset/problem/126/B)
- [UVA # 455 Periodic Strings](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=396)
- [UVA # 11022 String Factoring](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1963)
- [UVa # 455 Periodic Strings](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=396)
- [UVa # 11022 String Factoring](http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=1963)
- [UVa 11475 - Extend to Palindrome](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2470)
- [LA 6439 - Pasti Pas!](https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=588&page=show_problem&problem=4450)
- [Codechef - Chef and Strings](https://www.codechef.com/problems/CHSTR)