sort(数组名+起始下标,数组名+结束下标)
eg:sort(a,a+n);
sort(a+1,a+1+n);
头文件
algorithm
[做这道题试试水](https://www.luogu.com.cn/problem/P1177)
by 违规用户名6^quR5U6 @ 2019-12-14 09:53:19
```
int a[100005];
sort(a+1,a+n+1);//从a[1]到a[n]排序
```
by fzwfzwfzw @ 2019-12-14 09:54:14
对数组`a`的下标为`1~n`的元素由小到大排序:
`sort(a+1,a+n+1);`
by momentous @ 2019-12-14 09:54:39
@[Micro_Seven](/user/291358)
```cpp
sort(数组头指针,数组尾指针,比较方法);
```
by Froggy @ 2019-12-14 09:55:44