UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#193337#978. 逆序输出lyz1111000ms1204kbC++280b2023-10-14 10:08:042023-10-14 10:08:05

answer

#include <bits/stdc++.h>
using namespace std;

int a[30005];

int main()
{
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++) cin >> a[i];
	for (int i = 1; i <= n; i++) cout << a[i] << " ";
	cout << endl;
	for (int i = n; i >= 1; i--) cout << a[i] << " ";
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 20
Accepted
time: 0ms
memory: 1200kb

input:

5
32 54 12 44 8

output:

32 54 12 44 8 
8 44 12 54 32 

result:

ok 2 lines

Test #2:

score: 20
Accepted
time: 0ms
memory: 1200kb

input:

296
91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 7...

output:

91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 78 80...

result:

ok 2 lines

Test #3:

score: 20
Accepted
time: 0ms
memory: 1200kb

input:

182
91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 7...

output:

91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 78 80...

result:

ok 2 lines

Test #4:

score: 20
Accepted
time: 0ms
memory: 1204kb

input:

908
91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 7...

output:

91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 78 80...

result:

ok 2 lines

Test #5:

score: 20
Accepted
time: 0ms
memory: 1200kb

input:

911
91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 7...

output:

91 7 5 1 89 57 44 36 44 35 15 41 7 41 41 44 74 39 70 14 19 70 6 45 36 4 73 67 24 4 10 73 81 26 78 80...

result:

ok 2 lines