Solution for Mock CCC '20 Contest 2 S1 - Arithmetic Hybercube in C++


May 5, 2020 0.154061 seconds C++
#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	int arr[n];
	for(int i = 0; i < n; i++){
		cin >> arr[i];
	}
	
	sort(arr, arr + n);
	
	for(int i = 0; i < n; i++){
		cout << arr[i];
		if(i < n - 1) cout << " ";
	}

	return 0;
}

Editorial


No editorial for this problem. :(

Original Problem


You can view the original page for this problem on the DMOJ.