
排序
卡常带师
这个作者很懒,什么都没留下…
展开
-
归并排序
#include<stdio.h> #include<algorithm> #include<iostream> using namespace std; void merge(int arr[] , int L , int M , int R)//归并处理 { int Left_size = M-L;//左数组长度 int Right_si...原创 2018-11-08 01:37:03 · 122 阅读 · 0 评论 -
正序数?还是逆序数。洛谷P1428
//归并排序求正序数?(逆序)!!! #include<stdio.h> #include<string.h> using namespace std; #define maxn 1000005 struct node { int value; int mark; }a[maxn]; long long sum; int ans[maxn]; void m...原创 2018-11-18 15:36:33 · 362 阅读 · 0 评论 -
第M全排列
#include<stdio.h> #include<iostream> #include<algorithm> #include<string.h> #include<iostream> using namespace std; int n; long long m; int num[25]; bool mark[25]; void ...原创 2018-12-16 15:10:39 · 272 阅读 · 0 评论