优先队列迭代器,为什么会报错?

问题遇到的现象和发生背景

为什么会报错?

问题相关代码,请勿粘贴截图
#include <bits/stdc++.h>
using namespace std;
int n,m,ans;
struct Node {
    int a,b,val,num;
    bool operator < (const Node& rhs) const{
        return val > rhs.val;
    }
};
priority_queue<Node> q;
int main() {
    cin >> n >> m;
    for (int i = 0;i < n;i++){
        int x,y;
        cin >> x >> y;
        q.push(Node{x,y,max(x - y,0),1});
    }
    priority_queue<Node>::iterator it = q.begin();
    while(m--){
        it = q.begin();
        q.pop();
        ans += *it.val;
        q.push(Node{*it.a,*it.b,max(*it.a - (++*it.num) * *it.b,0),++*it.num});
    }
    cout << ans << endl;
    return 0;
}

报错内容:

Main.cpp: In function 'int main()':
Main.cpp:18:27: error: 'iterator' is not a member of 'std::priority_queue<Node>'
   18 |     priority_queue<Node>::iterator it = q.begin();
      |                           ^~~~~~~~
compilation terminated due to -Wfatal-errors.