Skip to content

Commit

Permalink
Update _config.butterfly.yml UTC 2024-10-18 Friday 07:45:24
Browse files Browse the repository at this point in the history
  • Loading branch information
liaohengfeng committed Oct 18, 2024
0 parents commit 2e938c9
Show file tree
Hide file tree
Showing 680 changed files with 40,184 additions and 0 deletions.
241 changes: 241 additions & 0 deletions 2023/07/923208f7/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2023/10/8078c4c0/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2023/12/d2f7f0f6/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/01/2d44b90/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/01/e6bedf51/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/01/f0bd1f8f/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/02/fc9b3a4f/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/03/8bd22dec/index.html

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions 2024/03/8f8a3f61/index.html

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions 2024/03/LHF's-good-problem/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/03/b4348eea/index.html

Large diffs are not rendered by default.

Binary file added 2024/03/b92b47a1/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2024/03/b92b47a1/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions 2024/03/b92b47a1/exgcd.mark_down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: 扩展欧几里得
tags:
- OI
- 扩欧
cover: 'https://pic.imgdb.cn/item/65eebd469f345e8d030d49d1.th.jpg'
abbrlink: b92b47a1
date: 2024-03-11 16:06:10
---


#### 在 $ax+by=gcd(a,b)$ 中:

1. 求解过程中始终有 **$|x| \leq |b|$** , **$|y| \leq |a|$**。

证明如下:
$$
由对称性设 a\geq b,a=kb+r \\
当b=0时,满足条件。且此时~|x|,|y|~满足最小值最小。\\
则有
\begin{cases}
~~~x_1a+y_1b~~~~~~~~=gcd(a,b) \\
~~~x_2b+y_2(a\%b)=gcd(b,a\%b)
\end{cases}\\
其中,
\begin{cases}
x_1=y_2\\
y_1=x_2-x_1\lfloor \frac{a}{b} \rfloor\\
x_2 \leq a\%b~~,~~y_2 \leq |b| ~~~ (数学归纳法)
\end{cases}\\
\therefore |x_1|=|y_2|\leq |b| \\
\begin{align}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\because y_1 &=x_2-x_1\lfloor \frac{a}{b} \rfloor \\
&=x_2-kx_1\\
&=
\begin{cases}
|1-k|b~\leq~|a| ~~~ (b>0)\\
|k-1|b~\leq~|a| ~~~ (b<0)
\end{cases} \\
\end{align}\\\
\therefore |y_1|\leq a \\\
综上所述, |x|\leq|b|,|y|\leq|a|。
$$

2. 设 $|a| \geq |b|$ , 则求出的 *x* 满足 $|x|$ 最小。

证明如下:
$$
在~1中,|x_1|\leq|a\%b|。\\
当~b\geq \lceil\frac{|a|}{2} \rceil~时,|x_1|\leq |a|-\lceil\frac{|a|}{2} \rceil=\lceil\frac{|a|}{2} \rceil \\
否则,|x_1|\leq b \leq \lceil\frac{|a|}{2} \rceil\\
\therefore |x_2|\leq\frac{a}{2} \\
因为|x_1|=|y_2|\leq\frac{b}{2},所以只用证 |y_1|\leq \frac{a}{2}\\
\begin{align}
\because y_1 &=x_2-x_1\lfloor \frac{a}{b} \rfloor \\
&=x_2-kx_1\\
&=\frac{a}{4} -k\frac{b}{2}\\
&=\frac{kb+r}{4}-\frac{kb}{2}\\
&=\frac{-kb+r}{2}\\
\therefore |y_1| &\leq\frac{|kb+r|}{2}
=\frac{|a|}{2}
\end{align}\\
综上,得证。
$$

241 changes: 241 additions & 0 deletions 2024/03/b92b47a1/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/03/cb668142/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/04/22202685/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/04/526fd0f8/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/05/843f9dbe/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/05/b6caff18/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/07/110ef1a6/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/07/4bc964e1/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/07/8a8ea489/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/07/c8588323/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/08/d03db090/index.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions 2024/10/7677242/index.html

Large diffs are not rendered by default.

Binary file added 7b8zxy39.webp
Binary file not shown.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.lhf.us.kg
241 changes: 241 additions & 0 deletions about/index.html

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions apps/cat/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>圈小猫小游戏</title>
<script src="./js/phaser.min.js"></script>
<script src="./js/catch-the-cat.js"></script>
<style>
#catch-the-cat{
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div id="catch-the-cat"></div>
</body>
<script>
window.game = new CatchTheCatGame({
w: 11,
h: 11,
r: 20,
backgroundColor: 0xeeeeee,
parent: 'catch-the-cat',
statusBarAlign: 'center',
credit: '廖桁锋'
});
</script>
</html>
19 changes: 19 additions & 0 deletions apps/cat/js/catch-the-cat.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/cat/js/phaser.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 2e938c9

Please sign in to comment.