#AR6. A+B Problem(交互)
A+B Problem(交互)
题目描述
这是一道交互题。
你需要引入头文件 aplusb.h。
你不需要实现 main 函数。
你需要实现一个函数:
std::vector<int>aplusb(int n,std::vector<int>a,std::vector<int>b);
该函数接受两个长度为 的数组 ,返回一个长度为 的数组 ,其中 。
保证 ,。
相关
在下列比赛中:
这是一道交互题。
你需要引入头文件 aplusb.h。
你不需要实现 main 函数。
你需要实现一个函数:
std::vector<int>aplusb(int n,std::vector<int>a,std::vector<int>b);
该函数接受两个长度为 n 的数组 a,b,返回一个长度为 n 的数组 c,其中 ci=ai+bi。
保证 1≤n≤5,0≤ai,bi≤10。