/**
* author: wxhtzdy
* created: 20.07.2022 18:22:42
**/
#include "reverse.h"
std::vector<long long> reverse(std::vector<long long> a) {
int n = a.size();
std::vector<long long> b(n);
for (int i = 0; i < n; i++) {
b[i] = a[n - i - 1];
}
return b;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
284 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
2 ms |
468 KB |
Output is correct |
8 |
Correct |
4 ms |
852 KB |
Output is correct |
9 |
Correct |
14 ms |
1972 KB |
Output is correct |
10 |
Correct |
35 ms |
5888 KB |
Output is correct |