int a[10001], n; void bubble_sort() { for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) if (a[i] < a[j]) swap(a[i], a[j]); }
首发于:https://www.luogu.com.cn/blog/zrc4889/