結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
purple_jwl
|
| 提出日時 | 2017-03-10 22:32:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 804 bytes |
| コンパイル時間 | 1,695 ms |
| コンパイル使用メモリ | 166,944 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-24 10:01:01 |
| 合計ジャッジ時間 | 3,207 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP (i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define popcount(x) __builtin_popcount(x)
#define popcountll(x) __builtin_popcountll(x)
#define uniq(x) x.erase(unique(x.begin(), x.end()), x.end())
#define F first
#define S second
#define mp make_pair
#define eb emplace_back
using namespace std;
typedef long long ll;
const int INF = 1 << 29;
int main() {
int n;
cin >> n;
int a[n];
rep (i, n) cin >> a[i];
rep (i, n) REP (j, i + 1, n) if (i + j < 2 * n - 3) {
if (a[i] > a[j]) swap(a[i], a[j]);
}
rep (i, n) {
if (i) cout << ' ';
cout << a[i];
}
cout << endl;
}
purple_jwl