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;
}

 

posted @ 2023-02-22 21:24  cnblogs_xiaogege  阅读(10)  评论(0)    收藏  举报