提交记录 15180
| 提交时间 |
评测时间 |
| 2020-12-09 18:56:36 |
2020-12-09 18:56:38 |
#include <algorithm>
void sort(unsigned *a, int n) {
if (n <= 1) return;
const int pivot = a[rand() % n];
int i = 0, j = 0, k = n;
while (i < k) {
if (a[i] < pivot)
std::swap(a[i++], a[j++]);
else if (pivot < a[i])
std::swap(a[i], a[--k]);
else
i++;
}
sort(a, j);
sort(a + k, n - k);
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 739.58 us | 48 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-21 06:09:43 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠