답안 #861445

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
861445 2023-10-16T08:12:18 Z hocky A Plus B (IOI23_aplusb) C++17
컴파일 오류
0 ms 0 KB
#include "aplusb.h"

std::vector<int> smallest_sums(int N, std::vector<int> A, std::vector<int> B) {
	if(N == 1) return 0;
	rep(i,0,N) {
		A[i] += B[i];
	}
	return A;
}

Compilation message

aplusb.cpp: In function 'std::vector<int> smallest_sums(int, std::vector<int>, std::vector<int>)':
aplusb.cpp:4:20: error: could not convert '0' from 'int' to 'std::vector<int>'
    4 |  if(N == 1) return 0;
      |                    ^
      |                    |
      |                    int
aplusb.cpp:5:6: error: 'i' was not declared in this scope
    5 |  rep(i,0,N) {
      |      ^
aplusb.cpp:5:2: error: 'rep' was not declared in this scope
    5 |  rep(i,0,N) {
      |  ^~~