diff --git a/20240826/learn.pdf b/20240826/learn.pdf new file mode 100644 index 0000000..bceb52c Binary files /dev/null and b/20240826/learn.pdf differ diff --git a/20240827/preComp/image/learn/1724749114259.png b/20240827/preComp/image/learn/1724749114259.png new file mode 100644 index 0000000..dddaf95 Binary files /dev/null and b/20240827/preComp/image/learn/1724749114259.png differ diff --git a/20240827/preComp/learn.md b/20240827/preComp/learn.md index 9fd9892..027d58f 100644 --- a/20240827/preComp/learn.md +++ b/20240827/preComp/learn.md @@ -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;//弧度制 +} +``` diff --git a/20240827/preComp/learn.pdf b/20240827/preComp/learn.pdf new file mode 100644 index 0000000..3eecc9c Binary files /dev/null and b/20240827/preComp/learn.pdf differ