結果
| 問題 |
No.490 yukiソート
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-03-30 10:16:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 562 bytes |
| コンパイル時間 | 827 ms |
| コンパイル使用メモリ | 81,244 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-26 00:22:04 |
| 合計ジャッジ時間 | 1,791 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 4 WA * 30 |
ソースコード
#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[j]+a[i]==x&&a[i]>a[j]) swap(a[i],a[j]);
}
}
for(long long int i=0;i<n;i++) cout << a[i] << " ";
cout << endl;
return 0;
}
focus