結果
| 問題 | No.490 yukiソート |
| コンテスト | |
| ユーザー |
mkan
|
| 提出日時 | 2017-03-10 23:38:06 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 525 bytes |
| 記録 | |
| コンパイル時間 | 659 ms |
| コンパイル使用メモリ | 95,176 KB |
| 実行使用メモリ | 16,072 KB |
| 最終ジャッジ日時 | 2026-03-10 12:58:06 |
| 合計ジャッジ時間 | 31,828 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 11 TLE * 10 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#define rep(i,a,b) for(int (i)=(a);i<(b);i++)
#define INF 100000000
using namespace std;
int main(){
int n,a[5010];
cin>>n;
rep(i,0,n)cin>>a[i];
rep(i,1,2*n-2){
rep(j,0,n){
rep(k,0,n){
if(j+k==i&&a[j]<a[k])swap(a[j],a[k]);
}
}
}
rep(i,0,n)cout<<a[i]<<" ";
cout<<endl;
return 0;
}
mkan