链接
OJ链接:传送门
AC代码
cpp
#include <iostream>
using namespace std;
int n, m;
int dx = 0, dy = 0;
int main() {
cin >> n >> m;
for (int i = 0; i < n; ++i) {
int x, y;
cin >> x >> y;
dx += x;
dy += y;
}
for (int i = 0; i < m; ++i) {
int x, y;
cin >> x >> y;
cout << x + dx << " " << dy + y << endl;
}
return 0;
}