문제는 여기! #include using namespace std; int N, M; vector v; vector p; void input(){ cin >> N >> M; for(int i=0; i> x; if(i==0){ v.push_back({x, x}); } else { v.push_back({x, v[i-1].second+x}); } } for(int i=0; i> x >> y; p.push_back({x, y}); } } void solve(){ for(int k=0; k