結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-03-30 10:19:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 554 bytes |
| コンパイル時間 | 737 ms |
| コンパイル使用メモリ | 80,984 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-26 00:22:34 |
| 合計ジャッジ時間 | 1,898 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 19 WA * 15 |
ソースコード
#include <iostream>
#include<vector>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
using namespace std;
int main (void) {
long long int j,n,num;
cin >> n;
vector<long long int> a(n);
for(long long int i=0;i<n;i++) cin >> a[i];
for(long long int x=1;x<2*n-3;x++){
for(long long int i=0;i<x/2;i++){
j = x-i;
if(a[i]>a[j]&&j<n) swap(a[i],a[j]);
}
}
for(long long int i=0;i<n;i++) cout << a[i] << " ";
cout << endl;
return 0;
}
focus