摘要:
#include<iostream>#include<algorithm>using namespace std;int main(){ int p[100]; int i,n,sum=0; cin>>n; for(i=0;i<n;i++) cin>>p[i]; sort(p,p+n); while 阅读全文
posted @ 2022-03-26 17:24
Rosemary~
阅读(61)
评论(0)
推荐(0)
摘要:
用法: 1、sort函数可以三个参数也可以两个参数,必须的头文件#include < algorithm>和using namespace std;2、它使用的排序方法是类似于快排的方法,时间复杂度为n*log2(n) 3、Sort函数有三个参数:(第三个参数可不写) (1)第一个是要排序的数组的起 阅读全文
posted @ 2022-03-26 17:07
Rosemary~
阅读(285)
评论(0)
推荐(0)
摘要:
#include<stdio.h>#include<string.h>int main(){ char aa[1000],bb[1000]; int a[1000],b[1000]; int len,i; scanf("%s%s",aa,bb); int l1=strlen(aa); int l2= 阅读全文
posted @ 2022-03-26 16:46
Rosemary~
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号