Submission #861445

# Submission time Handle Problem Language Result Execution time Memory
861445 2023-10-16T08:12:18 Z hocky A Plus B (IOI23_aplusb) C++17
Compilation error
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) {
      |  ^~~