Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
devilran6 committed Oct 4, 2023
1 parent 6e16aaa commit d28c8dc
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#F59F83",
"titleBar.activeBackground": "#F8BAA6",
"titleBar.activeForeground": "#310F04"
}
}
44 changes: 44 additions & 0 deletions docs/ACM/模拟vp/ccpc2023xiangtan_yaoqingsai.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@


## E. LCM Plus GCD
[题目链接](https://codeforces.com/gym/104396/problem/E)

**题意:**

输入x和k,求集合大小为k的方案数,集合中为$a_1, a_2, \cdots, a_k$各不相同的正整数,所有数的lcm+gcd=x

数据范围 1<= x,k <=1E9

**思路:**

首先,容易知道 lcm是gcd的倍数

设gcd = g, lcm = A * g

=> A * g + g = x

=> (A + 1) * g = x

即g是x的因数,故枚举g

考虑对每一个质因子, $p^{g_p}$是gcd中的系数, $p^{l_p}$是lcm中的系数

对于$a_1, a_2, \cdots, a_k$中的每一个数的质因子p的次方$k_i$

都需要满足 $g_p <= k_i <= l_p$

同时需要满足存在至少有一个$k_i$取到了$g_p$和$l_p$

- 考虑容斥

我们很好求得满足每个质数都 $g_p <= k_i <= l_p$ 的种类数

相当于一共能够造出 $S = \prod_{i = 1}^{不同的质因子个数}{l_p - g_p + 1}$ 个不同大小的数

之后 $C[S][K]$ 即可 (通过逆元阶乘来求组合数O(n))

一共有2m个约束条件(通过容斥来去除违反约束条件的情况)

取 $g_p <= k_i$ 还是 $g_p + 1 <= k_i$ (即没取到下界gcd的 == 违反限制条件)

取 $k_i <= l_p$ 还是 $k_i <= l_p + 1$ (即没取到上界lca的 == 违反限制条件)
97 changes: 97 additions & 0 deletions docs/Home.html

Large diffs are not rendered by default.

Binary file added docs/Home.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@
!!! note "a title"
hello world

```cpp
#include<iostream>
using namespace std
```
### 1234
> asjio
>
>
>
---
Binary file added docs/Home.pdf
Binary file not shown.
Binary file added docs/Home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion docs/Linux/Linux.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
!!! abstract

前面的区域,以后再来探索吧!
前面的区域,以后再来探索吧!

**Everything in Linux is a file**


!!! example

比如说ls就是一个文件,存在于/bin的目录下。

bin的含义就是binary二进制文件
10 changes: 8 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ theme:
- navigation.top # 返回顶部的按钮 在上滑时出现
- search.suggest # 搜索输入一些字母时推荐补全整个单词
- search.highlight # 搜索出的文章关键词加入高亮
- navigation.expand # 打开Tab时左侧目录全部展开
# - navigation.expand # 打开Tab时左侧目录全部展开
font:
text: Fira Code
code: Fira Code
Expand All @@ -41,6 +41,11 @@ markdown_extensions:
- pymdownx.superfences
- attr_list
- md_in_html
- pymdownx.critic
- pymdownx.caret
- pymdownx.keys
- pymdownx.mark
- pymdownx.tilde

# latex
extra_javascript:
Expand Down Expand Up @@ -78,8 +83,9 @@ nav:
- div2_899: ACM/CF/div2_899.md
- edu_155: ACM/CF/edu_155.md
- 模拟vp:
- CCPC 2022 mianyang: ACM/模拟vp/ccpc2022mianyang.md
- CCPC 2022 绵阳: ACM/模拟vp/ccpc2022mianyang.md
- ICPC 2023 网络赛第二场: ACM/模拟vp/icpc网络赛第二场.md
- CCPC 2023 湘潭邀请赛: ACM/模拟vp/ccpc2023xiangtan_yaoqingsai.md
- 专题训练:
- Math:
- CF数学: ACM/专题训练/Math/CF数学.md
Expand Down

0 comments on commit d28c8dc

Please sign in to comment.