結果
問題 | No.490 yukiソート |
ユーザー |
![]() |
提出日時 | 2020-01-20 16:22:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 1,577 ms |
コンパイル使用メモリ | 168,820 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 22:35:42 |
合計ジャッジ時間 | 5,663 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | AC * 2 WA * 12 RE * 20 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define rep(i, n) for (int i = 0; i < (n); i++)using ll = long long;using vll = vector<ll>;using vi = vector<int>;using vvi = vector<vector<int>>;using vvll = vector<vector<ll>>;const ll inf = 1e16;const ll md = 1000000007;int main() {int n;cin >> n;vector<double> a(n);rep(i,n) cin>>a[i];for(int i=1;i<2*n-3;i++){for(int p=0;;p++){int q=i-p;if(p>=q) break;if(a[p]>a[q]) swap(a[p],a[q]);}}rep(i,n){cout<<a[i];if(i==n-1){cout<<endl;break;}cout<<" ";}return 0;}