Problem

1/7

Clasificación rápida: Inicio (C++)

Theory Click to read/hide

Error

Problem

Dado N (1 <= N <= 100000) seguido de N números naturales desde 1 hasta < code>100< /code>. Imprime N números en orden no decreciente.
 
Ejemplos


# Entrada Salida
1
5
3 1 2 4 2
1 2 2 3 4
Write the program below
#include <iostream>
using namespace std;

void quickSrt(int arr[], int left, int right) {              
}

int main()
{
	int n;
	cin>>n;
	int* a = new int[n];
	for(int i = 0 ; i < n ; i ++)
	{
	  	cin>>a[i];
	}
	quickSrt(a,0,n-1);
        for(int i = 0 ; i < n ; i ++)
	{
	    cout<<a[i]<<" ";
	}	  
}              

     

Program check result

To check the solution of the problem, you need to register or log in!