Commit 527d060e authored by qwqbear's avatar qwqbear Committed by abc1763613206
Browse files

更新一些简介 (#1248)

* 数学部分简介标题重复

* 添加计算几何简介

* Update mkdocs.yml

* Update index.md

* Update io.md

* Update io.md

* Update index.md

* Update geometry/index.md

* Update io.md
parent 8d2f22de
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
利用计算机建立数学模型解决几何问题。

## 种类

- 二维计算几何
- 三维计算几何

## 基础

首先你要有一点数学几何基础

请先阅读 [数学杂项](/math/misc/) 部分。

### 以下是你可以在本部分找到的知识(部分未完成,待补充)

- 二维计算几何基础
- 三维计算几何基础
- 有关「距离」的知识
- Pick 定理
- 三角剖分
- 凸包
- 扫描线
- 旋转卡壳
- 半平面交
- 平面最近点对
- 随机增量法

+0 −1
Original line number Diff line number Diff line
## 数学部分简介

在 OI/ACM 的各种比赛中,常常会有数学题的出现。

+64 −0
Original line number Diff line number Diff line
@@ -209,6 +209,70 @@ template <typename T> inline T read(){ //声明 template 类,要求提供输入
    c = read<__int128>();
```

## 完整带调试版

```cpp
#define DEBUG 1//调试开关
namespace IO {
#define isdigit(x) x>='0'&&x<='9'
	const int MAXSIZE = 1 << 20;
	inline char gc() {
#if DEBUG //调试,可显示字符
		return getchar();
#endif
		static char buf[MAXSIZE],*p1=buf+MAXSIZE,*p2=buf+MAXSIZE;
		if(p1==p2) p2=(p1=buf)+fread(buf, 1, MAXSIZE, stdin);
		return p1==p2?-1:*p1++;
	}
	inline bool blank(char ch) {
		return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';
	}
	template<class T> inline void read(T &x) {
		register double tmp=1;
		register bool sign=0;
		x=0;
		register char ch=gc();
		for(; !isdigit(ch); ch=gc()) if(ch=='-') sign=1;
		for(; isdigit(ch); ch=gc()) x=x*10+ch-'0';
		if(ch=='.') for(ch=gc(); isdigit(ch); ch=gc()) tmp/=10.0, x+=tmp*(ch-48);
		if(sign) x=-x;
	}
	inline void read(char *s) {
		register char ch=gc();
		for (; blank(ch); ch=gc());
		for (; !blank(ch); ch=gc()) *s++=ch;
		*s=0;
	}
	inline void read(char &c) {
		for (c=gc(); blank(c); c=gc());
	}
	inline void push(const char &c) {
		char pbuf[MAXSIZE], *pp=pbuf;
		if (pp-pbuf==MAXSIZE) fwrite(pbuf, 1, MAXSIZE, stdout), pp=pbuf;
		*pp++=c;
	}
	template<class T> inline void write(T x) {
		static T sta[35];
		T top=0;
		do {
			sta[top++]=x%10, x/=10;
		} while (x);
#if DEBUG //调试,可显示字符
		while(top) putchar(sta[--top]+'0');
		return;
#endif		
		while(top) push(sta[--top]+'0');
	}
	template<class T> inline void write(T x,char lastChar) {
		write(x),putchar(lastChar); //打印末尾字符 ex.'\n'
	}
}
using namespace IO;
```

 


## 参考

<http://www.hankcs.com/program/cpp/cin-tie-with-sync_with_stdio-acceleration-input-and-output.html>
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ nav:
    - 数值积分: math/integral.md
    - 线性规划: math/linear-programming.md
    - 博弈论: math/game-theory.md
    - 杂项: math/misc.md
    - 数学杂项: math/misc.md
  - 数据结构:
    - 数据结构部分简介: ds/index.md
    - STL: