답안 #20583

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
20583 2017-02-12T13:15:56 Z model_code 뒤집기 (IOI16_reverse) C++11
100 / 100
46 ms 4284 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];
	}
	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++) {
                    ^
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1932 KB Output is correct
2 Correct 0 ms 1932 KB Output is correct
3 Correct 0 ms 1932 KB Output is correct
4 Correct 0 ms 1932 KB Output is correct
5 Correct 0 ms 1932 KB Output is correct
6 Correct 0 ms 1932 KB Output is correct
7 Correct 0 ms 2084 KB Output is correct
8 Correct 6 ms 2244 KB Output is correct
9 Correct 19 ms 2676 KB Output is correct
10 Correct 46 ms 4284 KB Output is correct