update
This commit is contained in:
		
							parent
							
								
									c10b77a787
								
							
						
					
					
						commit
						76225d8a25
					
				
							
								
								
									
										
											BIN
										
									
								
								20240826/learn.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								20240826/learn.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								20240827/preComp/image/learn/1724749114259.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								20240827/preComp/image/learn/1724749114259.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 196 KiB  | 
@ -1,3 +1,55 @@
 | 
				
			|||||||
 | 
					# 总览
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 选择
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## 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
 | 
					## 1
 | 
				
			||||||
@ -85,3 +137,21 @@ int main() {
 | 
				
			|||||||
- `cout.precision(n)`:设置浮点数输出的精度,即小数点后显示的位数。
 | 
					- `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
									
								
							
							
						
						
									
										
											BIN
										
									
								
								20240827/preComp/learn.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user