結果
| 問題 | No.490 yukiソート |
| コンテスト | |
| ユーザー |
mkan
|
| 提出日時 | 2017-03-10 23:33:10 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 509 bytes |
| 記録 | |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 94,652 KB |
| 実行使用メモリ | 16,076 KB |
| 最終ジャッジ日時 | 2026-03-10 12:56:17 |
| 合計ジャッジ時間 | 32,046 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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]<<" ";
return 0;
}
mkan