爬山(不考虑hack数据)
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
// 爬山
|
// 爬山(不考虑hack数据)
|
||||||
#include<bits/stdc++.h>
|
#include<bits/stdc++.h>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
const int N = 1e5 + 10;
|
const int N = 1e5 + 10;
|
||||||
|
// 贪心 + 堆维护最值, 时间复杂度 O(nlogn)
|
||||||
int main(){
|
int main(){
|
||||||
priority_queue<int> pq; // 大根堆
|
priority_queue<int> pq; // 大根堆
|
||||||
int n, p ,q; cin >> n >> p >> q;
|
int n, p ,q; cin >> n >> p >> q;
|
||||||
|
|||||||
Reference in New Issue
Block a user