#include using namespace std; #define PRINT_VEC(v){\ cout<<#v<<" [";\ for(size_t i=0;i &v){ for(size_t i=1;i=0&&v[j]>key){ v[j+1]=v[j]; --j; } v[j+1]=key; } } int main(){ size_t n; cin>>n; vector v(n); for(int &i:v){ cin>>i; } PRINT_VEC(v); sort_fix(v); PRINT_VEC(v); }