标签:tle ica str bre inpu 测试 ... pac mono
1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main() { 5 int t, n; 6 cin >> t; 7 while(t--) { 8 cin >> n; 9 int a = 1, b = n/2+1 +((n&1)?1:0); 10 for(int i = 1; i <= n; i ++) { 11 if(i&1){ 12 printf("%d%c",a++,i==n?‘\n‘:‘ ‘); 13 } else { 14 printf("%d%c",b++,i==n?‘\n‘:‘ ‘); 15 } 16 } 17 } 18 return 0; 19 }
标签:tle ica str bre inpu 测试 ... pac mono
原文地址:http://www.cnblogs.com/xingkongyihao/p/7819442.html