摘要: #include <bits/stdc++.h> using namespace std; void quick_sort(int a[], int l, int r) { if (l >= r) return; int x = a[l], i = l, j = r; while (i < j) { 阅读全文
posted @ 2021-02-19 22:06 Zeronera 阅读(49) 评论(0) 推荐(0) 编辑
摘要: D. Max Median 题意: 求所有长度不小于$k$的子区间中中位数最大值 思路: 二分答案,记当前答案为$x$,判断所有长度不小于$k$的子区间中是否存在中位数大于等于$x$的区间,即判断区间大于等于$x$的数的数量是否大于小于$x$的数的数量 #include<bits/stdc++.h> 阅读全文
posted @ 2021-02-19 19:08 Zeronera 阅读(48) 评论(0) 推荐(0) 编辑