Submission #114752

#TimeUsernameProblemLanguageResultExecution timeMemory
114752kimbj0709Reversing a Sequence (IOI16_reverse)C++17
100 / 100
44 ms5880 KiB
#include "reverse.h" #include <vector> #include<bits/stdc++.h> using namespace std; vector<long long> reverse (vector<long long> a) { reverse(a.begin(),a.end()); return a; vector<long long> t; long long int size = a.size(); for(long long int i=0;i<a.size();i++){ t.push_back(0); } for(long long int i=a.size()-1;i>-1;i--){ t[i] = a[size-i-1]; } return t; }

Compilation message (stderr)

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