#include <stdio.h> #include<malloc.h> int main() { int n; scanf("%d", &n); int* arr = (int*)malloc(n * sizeof(int)); for (int i = 0; i < n; i++) { scanf("%d", &arr[i]); } for (int i = 0; i < n; i++) { for (int j = 0; j < n - i - 1; j++) { if (arr[j] < arr[j + 1]) { int t = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = t; } } } for(int i=0;i<5;i++) printf("%d ", arr[i]); free(arr); return 0; }