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。