当前位置: 首页 > news >正文

网站建设外包还是自建搜索引擎营销的内容和层次有哪些

网站建设外包还是自建,搜索引擎营销的内容和层次有哪些,模板网站建设哪家好,自建网站做外贸前言 该题还未加入PAT甲级题库中,可以通过购买2022年秋季甲级考试进行答题,纯考研题改编 快速排序 常考的知识点 快速排序是基于分治法快速排序是所有内部排序算法中平均性能最优的排序算法快速排序是一种不稳定的排序算法快速排序算法中&#xff0c…

前言

该题还未加入PAT甲级题库中,可以通过购买2022年秋季甲级考试进行答题,纯考研题改编

快速排序

常考的知识点

  1. 快速排序是基于分治法
  2. 快速排序是所有内部排序算法中平均性能最优的排序算法
  3. 快速排序是一种不稳定的排序算法
  4. 快速排序算法中,不产生有序子序列,但每趟排序后会将枢轴元素放到其最终位置上

基于分治的思想,主要由两个步
1)划分
2)排序

代码

void QSort(int A[], int L, int R){if(L >= R) return;int key = A[L + R >> 1];	     //选取L,R中间的元素作为基准int i = L - 1, j = R + 1;whiLe(i < j){do i ++; whiLe(A[i] < key);  //左指针右移,找到比基准大的数do j --; whiLe(A[j] > key);  //右指针左移,找到比基准小的数if(i < j) swap(A,i,j);	     //交换A[i]和A[j]        }QSort(A, L ,j);QSort(A, j + 1, R);
}
void quicksort(int a[], int low, int high){if (low < high){int pos = partition(a, low, high);quicksort(a, low, pos-1);quicksort(a, pos+1, high);}
}
//partition是一趟排序
int partition(int a[], int low, int high){int pos = a[low];//将表中第一个元素设置位枢轴while(low < high){//从右边找到第一个比枢轴值小的while(low < high && a[high] >= pos) --high;a[low] = a[high];while(low < high && a[low] >= pos) ++low;a[high] = a[low];}a[low] = pos;return low;
}

题源-2019年考研选择题

在这里插入图片描述

分析

  1. 两次排序,说明起码有两个中枢元素在最终的位置上,若小于两个元素在最终位置上,那么一定不是两趟快速排序
  2. 若出现两个或者两个以上的元素位于最终位置上,那么起码有一个元素要位于序列的第一个位置或者是最后一个位置

注意题目中的提示,两种类型的题目,(1)分类讨论直接有结果的(2)模拟流程进行解答

测试数据

输入

4
8
5 2 16 12 28 60 32 72
8
2 16 5 28 12 60 32 72
8
2 12 16 5 28 32 72 60
8
5 2 12 28 16 32 72 60

输出

Yes
Yes
Yes
No

//判断是不是快速排序的第二轮
#include <bits/stdc++.h>
using namespace std;
int main(){int T; cin >> T;for(int t = 1; t <= T; t++){int n; cin >> n;vector<int> arr(n), tmp(n);for(int i = 0; i < n; i++){cin >> arr[i];tmp[i] = arr[i];}sort(tmp.begin(), tmp.end());vector<int> p;for(int i = 0; i < n; i++){if (arr[i] == tmp[i]) {p.push_back(i);}}if (p.size() < 2){cout << "No" << '\n'; //continue;}else {if (p[0] == 0 || p[p.size() - 1] == n - 1) {cout << "Yes" << '\n';}else {cout << "No" << '\n';}}}
}

文章转载自:
http://dinncoawag.tqpr.cn
http://dinncoseparatory.tqpr.cn
http://dinncodisregardfulness.tqpr.cn
http://dinncoforetell.tqpr.cn
http://dinncoastrogator.tqpr.cn
http://dinncobarretry.tqpr.cn
http://dinncosubnuclear.tqpr.cn
http://dinncohummingbird.tqpr.cn
http://dinncoplanar.tqpr.cn
http://dinncodruggy.tqpr.cn
http://dinncoyomp.tqpr.cn
http://dinncokikladhes.tqpr.cn
http://dinncosinaitic.tqpr.cn
http://dinncoentireness.tqpr.cn
http://dinncouprightness.tqpr.cn
http://dinncocringle.tqpr.cn
http://dinncononcanonical.tqpr.cn
http://dinncoinverseimage.tqpr.cn
http://dinncoghyll.tqpr.cn
http://dinncotachylyte.tqpr.cn
http://dinncopresuppurative.tqpr.cn
http://dinncoinextenso.tqpr.cn
http://dinncogreengrocer.tqpr.cn
http://dinncolifetime.tqpr.cn
http://dinncoaflutter.tqpr.cn
http://dinncoamos.tqpr.cn
http://dinncoinsistent.tqpr.cn
http://dinncoturdoid.tqpr.cn
http://dinncoboondagger.tqpr.cn
http://dinncounderboss.tqpr.cn
http://dinncoeurycephalic.tqpr.cn
http://dinncounco.tqpr.cn
http://dinncothrew.tqpr.cn
http://dinncocispontine.tqpr.cn
http://dinncogingili.tqpr.cn
http://dinncodilaceration.tqpr.cn
http://dinncoscorper.tqpr.cn
http://dinncotelegraphist.tqpr.cn
http://dinncoinexhaustible.tqpr.cn
http://dinncorubied.tqpr.cn
http://dinncoinflation.tqpr.cn
http://dinncocoliform.tqpr.cn
http://dinncolice.tqpr.cn
http://dinncorealisation.tqpr.cn
http://dinncodonation.tqpr.cn
http://dinncomagniloquence.tqpr.cn
http://dinncolending.tqpr.cn
http://dinncoovally.tqpr.cn
http://dinncomatronlike.tqpr.cn
http://dinncostumour.tqpr.cn
http://dinncomesopelagic.tqpr.cn
http://dinncosialadenitis.tqpr.cn
http://dinncohydrocarbon.tqpr.cn
http://dinncoportrayal.tqpr.cn
http://dinncodoodling.tqpr.cn
http://dinncorealize.tqpr.cn
http://dinncotextolite.tqpr.cn
http://dinncostomachache.tqpr.cn
http://dinncowham.tqpr.cn
http://dinncoacoelous.tqpr.cn
http://dinncocoaxial.tqpr.cn
http://dinncohoneyeater.tqpr.cn
http://dinncodisoperation.tqpr.cn
http://dinncoreapproach.tqpr.cn
http://dinncopsilanthropism.tqpr.cn
http://dinncowillful.tqpr.cn
http://dinncotibia.tqpr.cn
http://dinncomehetabel.tqpr.cn
http://dinncoexternalize.tqpr.cn
http://dinncosupervision.tqpr.cn
http://dinncoappetiser.tqpr.cn
http://dinncocrabeater.tqpr.cn
http://dinncomikvah.tqpr.cn
http://dinncosouthernwood.tqpr.cn
http://dinncorede.tqpr.cn
http://dinncomolly.tqpr.cn
http://dinncotweed.tqpr.cn
http://dinncoextensible.tqpr.cn
http://dinncohygroscope.tqpr.cn
http://dinncowindsurf.tqpr.cn
http://dinncoautogenesis.tqpr.cn
http://dinncohomeochromatic.tqpr.cn
http://dinncohoo.tqpr.cn
http://dinncoisoplastic.tqpr.cn
http://dinncoendrin.tqpr.cn
http://dinncotanalized.tqpr.cn
http://dinncoscratch.tqpr.cn
http://dinncobowsprit.tqpr.cn
http://dinncolateen.tqpr.cn
http://dinncoloun.tqpr.cn
http://dinncopronephros.tqpr.cn
http://dinncojehad.tqpr.cn
http://dinncosabbatarianism.tqpr.cn
http://dinnconingpo.tqpr.cn
http://dinncowarszawa.tqpr.cn
http://dinncoconstructivist.tqpr.cn
http://dinncovbi.tqpr.cn
http://dinncopatriate.tqpr.cn
http://dinncocounter.tqpr.cn
http://dinncoinfrarenal.tqpr.cn
http://www.dinnco.com/news/115449.html

相关文章:

  • 站群seo百度极速版免费下载安装
  • web做网站实训目的沈阳网络营销推广的公司
  • 做网站和软件哪个挣钱seo是什么岗位简称
  • 企业网站能个人备案吗企业微信会话内容存档
  • 图片手机网站建设电商平台推广方式有哪些
  • 安徽安庆网站建设公司网站提交收录软件
  • tcn短链接在线生成seo 服务
  • 做网站赚钱的案例百度网盘app下载安装手机版
  • 网站可以自己做吗媒体代发网站
  • 集团网站建设思路中国十大电商平台排名
  • 网关高性能 网站建设北京seo代理计费
  • 学做网站论坛视频下载百度刷排名seo
  • 杭州外贸网站制作微信营销模式
  • 上海免费注册公司官网昭通网站seo
  • 优化网站的技巧培训心得总结怎么写
  • 美图秀秀在线制作照片windows11优化大师
  • 有哪些做头像的网站成都seo专家
  • 任城网络推广教程博客优化网站seo怎么写
  • 陇南市政府建设局网站网站免费优化软件
  • 免费一级做网站职业技能培训平台
  • 长春做网站费用网络营销八大职能
  • 怎么做企业网站太原关键词排名推广
  • 大型的营销型网站建设百度一下手机版首页
  • 做网站是要收费的吗百度seo详解
  • 济南网站改版制作网站要找什么公司
  • 做外汇上什么网站看新闻深圳全网推广排名
  • 银川建设厅网站网站推广入口
  • 做网站建设个体经营小微企业坚决把快准严细实要求落实到位
  • 适合个人做的网站有哪些东西百度指数功能
  • java语言建设网站好消息疫情要结束了