include cstdio int main int mas scanf mas new int vector int mas for i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <cstdio>
int main() {
int n, m, *mas;
scanf("%d", &n);
mas = new int[n];
vector<int> mas(n);
for (int i = 0; i < n; ++i) {
mas[i] = n — i — 1;
}
for (int i = 0; i < n; ++i) {
for (int j = 1; j < n - i; ++j) {
if (mas[j - 1] > mas[j]) {
m = mas[j — 1];
mas[j — 1] = mas[j];
mas[j] = m;
}
}
}
for (int i = 0; i < n; ++i) {
printf("%d ", mas[i]);
}
delete[] mas;
return 0;
}