AcWing 614. 最大值
用优先队列解决——Easy
Link:614. 最大值 - AcWing题库
Code:
#include<cstdio> #include<queue> using namespace std; priority_queue<int,vector<int>> heap; signed main(){ for(int i=0;i<3;i++){int x;scanf("%d",&x);heap.push(x);} printf("%d eh o maior",heap.top()); return 0; }

浙公网安备 33010602011771号