#29885: 精簡的 C++ 快速解法


ck1100685@gl.ck.tp.edu.tw (LNJ)


<code><pre>

#include <bits/stdc++.h>

 

signed main() {

  std::ios::sync_with_stdio(false);

  std::cin.tie(NULL);

 

  int n, a[850] = {};

 

  while (std::cin >> n) {

    for (int i = 0; i < n; i++) std::cin >> a[i];

 

    std::sort(a, a + n);

 

    for (int i = 0; i < n; i++) std::cout << a[i] << " \n"[i == n - 1];

  }

}

 

</pre></code>