結果
問題 | No.490 yukiソート |
ユーザー | yansi819 |
提出日時 | 2024-03-31 11:42:02 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 517 bytes |
コンパイル時間 | 10,387 ms |
コンパイル使用メモリ | 261,820 KB |
実行使用メモリ | 13,480 KB |
最終ジャッジ日時 | 2024-03-31 11:42:21 |
合計ジャッジ時間 | 9,355 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
13,480 KB |
testcase_01 | AC | 2 ms
6,676 KB |
testcase_02 | AC | 2 ms
6,676 KB |
testcase_03 | AC | 2 ms
6,676 KB |
testcase_04 | AC | 17 ms
6,676 KB |
testcase_05 | AC | 17 ms
6,676 KB |
testcase_06 | AC | 17 ms
6,676 KB |
testcase_07 | AC | 17 ms
6,676 KB |
testcase_08 | AC | 17 ms
6,676 KB |
testcase_09 | AC | 17 ms
6,676 KB |
testcase_10 | AC | 17 ms
6,676 KB |
testcase_11 | AC | 17 ms
6,676 KB |
testcase_12 | AC | 17 ms
6,676 KB |
testcase_13 | AC | 17 ms
6,676 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ld = long double; int n, a[2020]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 1; i < 2 * n - 3; i++) { for (int p = 0; p < n; p++) { for (int q = p + 1; q < n; q++) { if (p + q == i) { if (a[p] > a[q]) swap(a[p], a[q]); } } } } for (int i = 0; i < n; i++) cout << a[i] << " \n"[i == n - 1]; return 0; }