This commit is contained in:
Zengtudor 2024-08-27 18:47:40 +08:00
parent c10b77a787
commit 76225d8a25
4 changed files with 70 additions and 0 deletions

BIN
20240826/learn.pdf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

View File

@ -1,3 +1,55 @@
# 总览
![1724749114259](image/learn/1724749114259.png)
# 选择
## 5
> 算法
n个数组成$Z_{1..n}$,建立数组$A_{1..{n\over2}}与B_{1..{n\over2}}$
$$
i=[1,{n\over2}],A_i=max(Z_{i},Z_{i+{n\over2}}),B_i=min(Z_i,Z_{i+{n\over2}})
$$
$$
max\_number=A_1,i=[2,{n\over2}],max\_number=\max(max\_number,A_i)
$$
$$
min\_number=B_1,i=[2,{n\over2}],min\_number=\min(min\_number,B_i)
$$
所以总次数是
$$
times={3\over2}n-2
$$
在题目中是2n个数所以是3n-2
## 7
### 完全图n个点时
$$
边数={n\times(n-1)\over2}
$$
### 非连通图+1即可
> 解方程
$$
{n\times(n-1)\over2}\geq36
$$
> 最后记得非连通图要+1
>
> 答案是10
# 阅读程序
## 1
@ -85,3 +137,21 @@ int main() {
- `cout.precision(n)`:设置浮点数输出的精度,即小数点后显示的位数。
这两个函数常一起使用,控制浮点数的输出格式和精度。
### 17.
```cpp
int/int=int
int/double=double
double/double=double
```
### 19
```cpp
//acos的逻辑逻辑代码
double acos(double num){
find t where{cos(t) == num;}
return t;//弧度制
}
```

BIN
20240827/preComp/learn.pdf Normal file

Binary file not shown.