Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
34789 沈仲恩 【S】T1 C++ 通过 100 175 MS 4188 KB 1042 2024-11-14 16:01:51

Tests(10/10):


#include <bits/stdc++.h> // #define int long long using namespace std; int n, a[1000005]; // #define getchar getchar_unlocked inline void read(int &x) { char c = getchar(); x = 0; while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = x * 10 + (c ^ 48), c = getchar(); } signed main() { // freopen("reverse.in", "r", stdin); // freopen("reverse.out", "w", stdout); ios::sync_with_stdio(false); cout.tie(0); cin.tie(0); cin >> n; for (int i = 1; i <= n; i++) { // read(a[i]); cin >> a[i]; } // cerr << 1 << endl; for (int i = n; i >= 1; i -= 2) { cout << a[i] << ' '; // printf("%d ", a[i]); } // cerr << 2 << endl; for (int i = 1 + (n & 1); i <= n; i += 2) { cout << a[i] << ' '; // printf("%d ", a[i]); } cout << endl; cout.flush(); // cerr << 3 << endl; // cerr << clock() * 1.0 / CLOCKS_PER_SEC; return 0; }


测评信息: