結果
問題 | No.490 yukiソート |
ユーザー |
|
提出日時 | 2017-03-10 22:41:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 414 bytes |
コンパイル時間 | 751 ms |
コンパイル使用メモリ | 72,204 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 10:10:29 |
合計ジャッジ時間 | 18,368 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 24 TLE * 10 |
ソースコード
#include<iostream>#include<algorithm>#include<vector>using namespace std;int main(){int n;cin >> n;vector<int> v(n);for(int i=0; i<n;i++) cin >> v[i];for(int i=1; i<2*n-3; i++){for(int j=0; j<i; j++){for(int k=j+1; k<n; k++){if(k+j == i && v[j] > v[k]){int tmp = v[j];v[j] = v[k];v[k] = tmp;}}}}for(int i: v){cout << i << " ";}cout << endl;}