题解 | #小红的排列构造#
小红的排列构造
https://www.nowcoder.com/practice/2b0a9318cc0740d1a78eec06162e7bea
#include <stdio.h> int main() { int n; while (scanf("%d", &n) != EOF) { if(n < 3) { printf("-1\n"); return 0; } else { printf("3 2 1"); for(int i = 4; i <= n; i++) { printf(" %d", i); } } } return 0; }