Nathan Coulas

List Minimum (Hard)

bf1hard CPP17 12 Apr, 2020 0.092s 5 points

Source Code

#include <bits/stdc++.h>

using namespace std;

template<class C>constexpr int sz(const C&c){return int(c.size());}

  int main(){
      ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
		
		int n, temp = 0;
		cin >> n; 
		int arr[n] = {0};
		
		for(int i = 0; i < n; i++){
			cin >> temp;
			arr[i] = temp;
		}
		
		int b = sizeof(arr)/sizeof(arr[0]);
		sort(arr, arr+b);
		
		for(int i = 0; i < n; i++){
			cout << arr[i] << "\n";
			
		}
		
      
      return 0;
}