随笔分类 -  greedy

摘要:link class Solution { public: int stoneGameVI(vector<int>& aliceValues, vector<int>& bobValues) { int n=aliceValues.size(); vector<int> sum(n); for(in 阅读全文
posted @ 2020-12-14 08:28 feibilun 阅读(125) 评论(0) 推荐(0)
摘要:link prove: @interviewrecipes https://leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid/discuss/768076/Min-Adjacent-Swaps-to-Sort-the-array 阅读全文
posted @ 2020-08-04 11:05 feibilun 阅读(166) 评论(0) 推荐(0)
摘要:link class Solution { public: vector<string> maxNumOfSubstrings(string s) { int n=s.size(); vector<int> left(26,n); vector<int> right(26,-1); for(int 阅读全文
posted @ 2020-07-19 22:18 feibilun 阅读(135) 评论(0) 推荐(0)
摘要:link class Solution { public: #define LL long long int maxPerformance(int n, vector<int>& speed, vector<int>& efficiency, int k) { vector<pair<int,int 阅读全文
posted @ 2020-03-15 17:55 feibilun 阅读(248) 评论(0) 推荐(0)
摘要:link #include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <climits> #include <unordered_map> #include <cstdio> #include 阅读全文
posted @ 2020-03-07 07:57 feibilun 阅读(131) 评论(0) 推荐(0)