#include <stdio.h> #include<malloc.h> void swap(int* a, int* b) { int temp = *a; *a = *b; *b = temp; } int main() { int a; scanf("%d", &a); int* arr = malloc(sizeof(int) * a); for (int i = 0; i < a; i++) { scanf("%d", &ar...