摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 int len; 4 int myheap[12]; 5 //堆排序每个子节点最多交换log次,所以堆排是nlogn; 6 void put(int x) 7 { 8 myheap[++len]=x 阅读全文
posted @ 2021-12-13 22:45
matt-11
阅读(36)
评论(0)
推荐(0)
摘要:
2106. 摘水果 1 const int N=2e6; 2 int lt[N],rt[N]; 3 class Solution { 4 public: 5 int maxTotalFruits(vector<vector<int>>& fruits, int startPos, int k) { 阅读全文
posted @ 2021-12-13 21:23
matt-11
阅读(102)
评论(0)
推荐(0)
摘要:
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 map<ll,int>mp; 5 const int N=1e6; 6 ll ans[N]; 7 int main() 8 { 9 int m; 10 阅读全文
posted @ 2021-12-13 16:57
matt-11
阅读(46)
评论(0)
推荐(0)

浙公网安备 33010602011771号