链接
代码
#include <iostream>
using namespace std;
const int N = 305;
int a[N], t, n;
int main() {
cin >> t;
while (t--){
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> a[i];
}
int l = 1, r = n;
while (l <= r){
if (l == r){
cout << a[l];
break;
}
cout << a[l++] << " ";
cout << a[r--] << " ";
}
cout << '\n';
}
return 0;
}