| 提出番号 | 1087 |
|---|---|
| 提出者 | yakimeshi No.2 |
| 言語 | C++ |
| 提出日時 | 2017-12-10 12:53:49 |
| 問題名 | (20)ソートするだけ |
| 結果 | TLE |
| 点数 | 0% |
| テストケース | 結果 | 得点 | 実行時間 | メモリ使用量 |
|---|---|---|---|---|
| 1 | WA | 0% | 13ms | 0KB |
| 2 | WA | 0% | 47ms | 0KB |
| 3 | WA | 0% | 909ms | 0KB |
| 4 | TLE | 0% | 10250ms | 0KB |
| 5 | WA | 0% | 19ms | 0KB |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int n;
int b;
int c=0;
vector<int> a;
cin>>n;
for(int p=0;p<n;++p){
cin>>b;
a.push_back(b);
}
for(int p=0;;++p){
for(int i=0;i<n-1;++i){
if(a[p]>a[p+1]){
a[p]=a[p+1];
a[p+1]=a[p];
++c;
}
}
if(c=0){
break;
}
else{
c=0;
}
}
for(int p=0;p<n;++p){
cout<<a[p]<<" ";
}
}