#include
#include
#include
#include
using namespace std;
int main( )
{
const int a[] = { 8, 7, 4, 9, 5, 2, 6, 2, 7,9, };
const int len = sizeof( a ) / sizeof( a[0] );
const int percentile_20 = static_cast( 0.2 * len );
vector v( a, a+len );
copy( a, a+len, v.begin() );
partial_sort( v.begin(), v.begin()+percentile_20,v.end() );
copy( v.begin(), v.begin()+percentile_20,ostream_iterator( cout, " " ) );
}