代码,已经超级卡常了死活过不去。
#define LOCAL
#include <iostream>
#include <cstdio>
using namespace std;
namespace ly
{
namespace IO
{
#ifndef LOCAL
#define SIZE (1 << 20)
char in[SIZE], out[SIZE], *p1 = in, *p2 = in, *p3 = out;
#define getchar() (p1 == p2 && (p2 = (p1 = in) + fread(in, 1, SIZE, stdin), p1 == p2) ? EOF : *p1++)
#define flush() (fwrite(p3 = out, 1, SIZE, stdout))
#define putchar(ch) (p3 == out + SIZE && flush(), *p3++ = (ch))
class Flush
{
public:
~Flush() { flush(); }
} _;
#endif
template <typename type>
inline void read(type &x)
{
x = 0;
bool flag(0);
char ch = getchar();
while (!isdigit(ch))
flag ^= ch == '-', ch = getchar();
while (isdigit(ch))
x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
flag ? x = -x : 0;
}
template <typename type>
inline void write(type x, bool flag = 1)
{
x < 0 ? x = -x, putchar('-') : 0;
static short Stack[50], top(0);
do
Stack[++top] = x % 10, x /= 10;
while (x);
while (top)
putchar(Stack[top--] | 48);
flag ? putchar('\n') : putchar(' ');
}
#ifndef LOCAL
#undef SIZE
#undef getchar
#undef putchar
#undef flush
#endif
}
}
using namespace ly::IO;
const int maxn = 1e7 + 5;
int nums[maxn];
main()
{
int a;
read(a);
register int i;
for (i = 1;i <= a;++i)
{
read(nums[i]);
}
for (i = a;i >= 1;--i)
{
write(nums[i], 0);
}
return 0;
}