Submission #114752

# Submission time Handle Problem Language Result Execution time Memory
114752 2019-06-02T14:22:54 Z kimbj0709 Reversing a Sequence (IOI16_reverse) C++17
100 / 100
44 ms 5880 KB
#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

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 time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 4 ms 512 KB Output is correct
8 Correct 7 ms 896 KB Output is correct
9 Correct 16 ms 2040 KB Output is correct
10 Correct 44 ms 5880 KB Output is correct