#include<iostream>
#include<string>
using namespace std;
int main(){
string arry[101], pt;
int N, K;
cin >> N >> K;
for (int i = 1; i <=N; i++)
cin >> arry[i];
for(int i=1;i<=K;i++)
for (int j =1; j <= N- i; j++)
if (arry[j] > arry[j + 1])
{
pt = arry[j + 1]; arry[j + 1] = arry[j]; arry[j] = pt;
}
for (int i = 1; i <= N; i++)
{
if (i != 1) cout << endl;
cout << arry[i];
}
}
10-01
935
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-15
1516
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-27