![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
排序
ZMST
这个作者很懒,什么都没留下…
展开
-
PAT——1025 Ranking(排序 strcmp用法 sort)
题意链接:#include<iostream>#include<cstdio>#include<cmath>#include<cstring>#include<string>#include<algorithm>using namespace std;struct student{ char nam...原创 2018-08-11 11:19:41 · 241 阅读 · 0 评论 -
热身赛之6——KMatrix Searching
题目链接:矩阵排序受同学启发用结构体做会更简单#include <iostream>#include<cstring>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;#define maxn 1000010;stru...原创 2018-08-20 19:15:13 · 125 阅读 · 0 评论 -
快速排序学习小结
快速排序是排序算法中平均时间复杂度为O(nlogn)的一种算法【问题】对一个序列A[1]、A[2]、……、A[n],调整序列中元素的位置,使得A[1](原序列的A[1],下同)的左侧所有元素都不超过A[1]、右侧所有元素都大于A[1].例如对序列{5,3,9,6,4,1}来说,可以调整序列中元素的位置,形成序列{3,1,4,5,9,6}【思想】two pointers①...转载 2018-08-23 19:49:09 · 218 阅读 · 0 评论 -
天梯赛——名人堂与代金券(结构体)
题目链接:#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<queue>#include<iostream>#include<stack>using namespace std;typedef原创 2018-08-29 19:24:49 · 554 阅读 · 0 评论 -
zcmu——4935: 成绩排序
题目链接【分析】zcmu的wa为什么都是与不断输入有关的找错找半天以后还是不能直接看题解#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#def...原创 2018-09-13 14:12:44 · 314 阅读 · 0 评论 -
zcmu——4937: EXCEL排序
题目链接【分析】理清关系就好#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 1000010struct student{ ...原创 2018-09-13 14:41:00 · 189 阅读 · 0 评论 -
zcmu——4951: 字符串排序
题目链接:#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>using namespace std;#define maxn 10010struct node{ int len; ch...原创 2018-09-14 13:26:46 · 255 阅读 · 0 评论 -
zcmu——4945: 字符排序
题目链接:#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>using namespace std;bool cmp(char a,char b){ return a<b;}int ...原创 2018-09-14 13:55:00 · 245 阅读 · 0 评论 -
zcmu——4938: 字符串内排序
题目链接:#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>using namespace std;bool cmp(char a,char b){ return a<b;}int ...原创 2018-09-14 13:57:26 · 267 阅读 · 0 评论 -
zcmu——4939: 大整数排序
题目链接:【分析】就是把大整数当做字符串来排序#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#include<cmath>using namespace std;#define maxn 1010string a[ma...原创 2018-09-14 14:10:20 · 276 阅读 · 0 评论 -
归并排序学习小结
基本2-路归并排序:将序列两两分组,将序列归并成[n/2]个组,组内单独排序然后将这些组再两两归并生成[n/4]个组,组内再单独排序以此类推直到只剩下一个组为止归并排序的时间复杂度为O(nlogn)2-路归并排序的核心在于如何将两个有序序列合并成一个有序序列具体实现有两种方法:1、递归实现const int maxn=100;void merge(int...原创 2018-08-23 12:50:42 · 385 阅读 · 0 评论 -
15浙江省赛G Lunch Time(结构体 排序)
题目链接:#include<bits/stdc++.h>using namespace std;struct food{ char str[55]; int price;}ff[1010],dd[1010],cc[1010];bool cmp(food a,food b){ return a.price<b.price;}int main(){...原创 2018-08-22 16:39:07 · 149 阅读 · 0 评论 -
PAT——乙级1015(A1062)(排序)
题目链接:#include<iostream>#include<cstdio>#include<cmath>#include<cstring>#include<string>#include<algorithm>using namespace std;//#define N 100010struct St...原创 2018-08-11 20:21:05 · 139 阅读 · 0 评论 -
PAT——A1012(排序)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;struct Student{ int id; int grade[4];}stu[...原创 2018-08-12 10:42:56 · 309 阅读 · 0 评论 -
PAT——A1016(排序)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 1010int toll[25];struct Record{ ...原创 2018-08-12 14:37:37 · 703 阅读 · 0 评论 -
PAT——A1028(排序 sort)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 100010struct Student{ int id; ...原创 2018-08-12 15:02:11 · 165 阅读 · 0 评论 -
PAT——A1055(排序)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 100010struct person{ char name[10...原创 2018-08-12 16:25:09 · 189 阅读 · 0 评论 -
PAT——A1075(排序)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 10010struct Student{ int id; ...原创 2018-08-12 18:41:05 · 223 阅读 · 0 评论 -
PAT——A1083(排序)
题意链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 10010struct Student{ char name[11...原创 2018-08-12 18:58:26 · 202 阅读 · 0 评论 -
PAT——A1080(排序)
题意链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>using namespace std;#define maxn 10010struct Student{ int GE,GI,su...原创 2018-08-12 19:38:58 · 394 阅读 · 0 评论 -
PAT——A1095(排序)
题目链接:#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>#include<map>using namespace std;#define maxn 10010struct Car{...原创 2018-08-12 22:18:58 · 221 阅读 · 0 评论 -
HDU——3789 奥运排序问题
题目链接:不是总排名,是给定的序号排名!!!#include<iostream>#include<set>#include<string>#include<cmath>#include<cstring>#include<algorithm>#include<cstdio>using name原创 2018-09-28 13:50:03 · 392 阅读 · 0 评论