Submission #170341

#TimeUsernameProblemLanguageResultExecution timeMemory
170341ngmhReversing a Sequence (IOI16_reverse)C++11
100 / 100
50 ms5996 KiB
#include "reverse.h" #include <vector> #include <algorithm> std::vector<long long> reverse (std::vector<long long> a) { for(int i = 0; i < a.size()/2; i++){ long long temp = a[i]; a[i] = a[a.size()-i-1]; a[a.size()-i-1] = temp; } return a; }

Compilation message (stderr)

reverse.cpp: In function 'std::vector<long long int> reverse(std::vector<long long int>)':
reverse.cpp:6:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < a.size()/2; i++){
                    ~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...