排序
onlyylno
这个作者很懒,什么都没留下…
展开
-
快速排序
#include <iostream> #include <algorithm> using namespace std; const int maxn = 100000; int a[maxn]; void quick_sort(int l, int r){ int temp = a[(l + r) >> 1]; int i = l,...原创 2018-07-31 08:34:40 · 102 阅读 · 0 评论 -
离散化
#include <iostream> #include <algorithm> using namespace std; const int maxn = 1001; int lsh[maxn], cnt, num[maxn]; int n; // 重复元素离散化后数字相同 void func1(){ cin >> n; for(in...原创 2018-09-27 23:51:56 · 156 阅读 · 0 评论