Submission #20585

# Submission time Handle Problem Language Result Execution time Memory
20585 2017-02-12T13:32:06 Z model_code Reversing a Sequence (IOI16_reverse) C++11
0 / 100
0 ms 1932 KB
#include "reverse.h"
 
std::vector<long long> reverse(std::vector<long long> a) {
	std::vector<long long> res(a.size());
	for (int i = 0; i < a.size(); i++) {
		res[i] = a[a.size() - i - 1] * 2;
	}
	return res;
}

Compilation message

reverse.cpp: In function 'std::vector<long long int> reverse(std::vector<long long int>)':
reverse.cpp:5:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < a.size(); i++) {
                    ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1932 KB Output isn't correct
2 Halted 0 ms 0 KB -