#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int arr[] = {0, 2, 1, -3, -5, 3, 1, 2}; //8 elements
int *min_pointer = std::min_element(arr, arr+8);
if (min_pointer == arr+8) return 0;
std::sort(min_pointer, arr+8);
for (int i=0; i!=8; i++)
cout<<arr[i]<<endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYXJyW10gPSB7MCwgMiwgMSwgLTMsIC01LCAzLCAxLCAyfTsgLy84IGVsZW1lbnRzCglpbnQgKm1pbl9wb2ludGVyID0gc3RkOjptaW5fZWxlbWVudChhcnIsIGFycis4KTsKCWlmIChtaW5fcG9pbnRlciA9PSBhcnIrOCkgcmV0dXJuIDA7CgkKCXN0ZDo6c29ydChtaW5fcG9pbnRlciwgYXJyKzgpOwoJCglmb3IgKGludCBpPTA7IGkhPTg7IGkrKykKCQljb3V0PDxhcnJbaV08PGVuZGw7CgkKCXJldHVybiAwOwp9