Submission #634421

# Submission time Handle Problem Language Result Execution time Memory
634421 2022-08-24T11:24:41 Z ahmed_shafik Reversing a Sequence (IOI16_reverse) C++17
Compilation error
0 ms 0 KB
#include "reverse.h"

std::vector<long long> reverse(std::vector<long long> a)
{
    std::reverse(a.begin(),a.end());
  return std::vector<long long>a;
}

Compilation message

reverse.cpp: In function 'std::vector<long long int> reverse(std::vector<long long int>)':
reverse.cpp:5:10: error: 'reverse' is not a member of 'std'; did you mean 'reverse'?
    5 |     std::reverse(a.begin(),a.end());
      |          ^~~~~~~
reverse.cpp:3:24: note: 'reverse' declared here
    3 | std::vector<long long> reverse(std::vector<long long> a)
      |                        ^~~~~~~
reverse.cpp:6:32: error: expected primary-expression before 'a'
    6 |   return std::vector<long long>a;
      |                                ^
reverse.cpp:6:32: error: expected ';' before 'a'
    6 |   return std::vector<long long>a;
      |                                ^
      |                                ;
reverse.cpp:6:32: warning: statement has no effect [-Wunused-value]