aboutsummaryrefslogtreecommitdiff
path: root/01_introductory_problems/permutations_1070.cpp
blob: 44387957c7e5aae6576e1c30e0d7075f327351d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

int main() {
	int n;
	std::cin >> n;
	if (n == 2 || n == 3) {
		std::cout << "NO SOLUTION" << std::endl;
	} else {
		for (int i = 2; i <= n; i += 2)
			std::cout << i << " ";
		for (int i = 1; i <= n; i += 2)
			std::cout << i << " ";
		std::cout << std::endl;
	}
}

Generated with cgit - Back to sebastiano.tronto.net