#include <iostream>
#include <queue>
#include <algorithm>
#include <stack>
#include <string>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <list>
#include <stdio.h>
#include <stdlib.h>
#define ll long long
#define sz size()
using namespace std;
int arr[100000], n;
void Shell_Sort()
{
for (int gap = n / 2; gap >= 1; gap /= 2){
for (int x = gap; x < n; x++){
if (arr[x] < arr[x - gap]){
int tmp = arr[x];
int i = x;
while (i > 0 && tmp < arr[i-gap]){
arr[i] = arr[i-gap];
i = i - gap;
}
arr[i] = tmp;
}
}
}
}
/// 1 3 7 8 5
int main()
{
cin >> n;
for (int x = 0; x < n; cin >> arr[x++]);
Shell_Sort();
for (int x = 0; x < n; cout << arr[x++] << ' ');
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8cXVldWU+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxzdGFjaz4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8bWFwPgojaW5jbHVkZSA8c2V0PgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPGNzdHJpbmc+CiNpbmNsdWRlIDxpb21hbmlwPgojaW5jbHVkZSA8bGlzdD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgc3ogc2l6ZSgpCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGFyclsxMDAwMDBdLCBuOwoKdm9pZCBTaGVsbF9Tb3J0KCkKewoJZm9yIChpbnQgZ2FwID0gbiAvIDI7IGdhcCA+PSAxOyBnYXAgLz0gMil7CgkJZm9yIChpbnQgeCA9IGdhcDsgeCA8IG47IHgrKyl7CgkJCWlmIChhcnJbeF0gPCBhcnJbeCAtIGdhcF0pewoJCQkJaW50IHRtcCA9IGFyclt4XTsKCQkJCWludCBpID0geDsKCQkJCXdoaWxlIChpID4gMCAmJiB0bXAgPCBhcnJbaS1nYXBdKXsKCQkJCQlhcnJbaV0gPSBhcnJbaS1nYXBdOwoJCQkJCWkgPSBpIC0gZ2FwOwoJCQkJfQoJCQkJYXJyW2ldID0gdG1wOwoJCQl9CgkJfQoJfQp9Ci8vLyAxIDMgNyA4IDUKCmludCBtYWluKCkKewoJY2luID4+IG47Cglmb3IgKGludCB4ID0gMDsgeCA8IG47IGNpbiA+PiBhcnJbeCsrXSk7CglTaGVsbF9Tb3J0KCk7Cglmb3IgKGludCB4ID0gMDsgeCA8IG47IGNvdXQgPDwgYXJyW3grK10gPDwgJyAnKTsKCXJldHVybiAwOwp9Cg==
prog.cs(2,0): error CS1024: Wrong preprocessor directive
prog.cs(3,0): error CS1024: Wrong preprocessor directive
prog.cs(4,0): error CS1024: Wrong preprocessor directive
prog.cs(5,0): error CS1024: Wrong preprocessor directive
prog.cs(6,0): error CS1024: Wrong preprocessor directive
prog.cs(7,0): error CS1024: Wrong preprocessor directive
prog.cs(8,0): error CS1024: Wrong preprocessor directive
prog.cs(9,0): error CS1024: Wrong preprocessor directive
prog.cs(10,0): error CS1024: Wrong preprocessor directive
prog.cs(11,0): error CS1024: Wrong preprocessor directive
prog.cs(12,0): error CS1024: Wrong preprocessor directive
prog.cs(13,0): error CS1024: Wrong preprocessor directive
prog.cs(14,0): error CS1024: Wrong preprocessor directive
prog.cs(15,0): error CS1024: Wrong preprocessor directive
prog.cs(16,0): error CS1024: Wrong preprocessor directive
prog.cs(18,0): error CS1025: Single-line comment or end-of-line expected
prog.cs(19,0): error CS1025: Single-line comment or end-of-line expected
prog.cs(20,6): error CS1041: Identifier expected, `namespace' is a keyword
prog.cs(20,19): error CS1001: Unexpected symbol `;', expecting identifier
prog.cs(22,8): error CS1514: Unexpected symbol `[', expecting `.' or `{'
prog.cs(22,9): warning CS0658: `value' is invalid attribute target. All attributes in this attribute section will be ignored
prog.cs(28,14): error CS1525: Unexpected symbol `<'
Compilation failed: 21 error(s), 1 warnings