結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
tenkyu9
|
| 提出日時 | 2018-03-24 23:37:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 533 bytes |
| コンパイル時間 | 811 ms |
| コンパイル使用メモリ | 81,296 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-25 03:19:02 |
| 合計ジャッジ時間 | 2,115 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 21 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<climits>
using namespace std;
typedef long long int ll;
int main(){
ll n, a[4000]={0};
cin >> n;
for(int i=0; i<n; i++){
cin >> a[i];
}
for(int i=1; i<=2*n-3; i++){
for(int j=0; j<=i; j++){
if(a[j]>a[i-j]){
int tmp=a[j];
a[j]=a[i-j];
a[i-j]=tmp;
}
}
}
for(int i=n-1; 0<=i; i--){
cout << a[i] <<" ";
}
cout << endl;
return 0;
}
tenkyu9