CSP-202309-1-坐标变换(其一)
解题代码
#include <iostream>
using namespace std;
long long n, m, dx, dy, x, y;
int main() {
cin >> n >> m;
for (size_t i = 0; i < n; i++)
{
int dx_i, dy_i;
cin >> dx_i >> dy_i;
dx += dx_i, dy += dy_i;
}
for (size_t i = 0; i < m; i++)
{
cin >> x >> y;
cout << x + dx << " " << y + dy << endl;
}
return 0;
}