AcWing 3778. 平衡数组 Posted on 2021-07-24 Edited on 2024-11-24 In AcWing 12345678910111213#include <cstdio>using namespace std;int t, n;int main() { scanf("%d", &t); while (t--) { scanf("%d", &n); printf("%d\n", n - 1); for (int i = 1; i <= n - 1;) printf("%d ", ++i); puts(""); } return 0;}