Submission #393574

#TimeUsernameProblemLanguageResultExecution timeMemory
393574tinjyuReversing a Sequence (IOI16_reverse)C++14
100 / 100
42 ms5808 KiB
#include "reverse.h" #include <iostream> using namespace std; std::vector<long long> reverse(std::vector<long long> a) { for(int i=0;i<a.size()/2;i++) { swap(a[i],a[a.size()-i-1]); } return a; }

Compilation message (stderr)

reverse.cpp: In function 'std::vector<long long int> reverse(std::vector<long long int>)':
reverse.cpp:5:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 |  for(int i=0;i<a.size()/2;i++)
      |              ~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...