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