摘要: link class Solution { public: int findMaxValueOfEquation(vector<vector<int>>& points, int k) { deque<int> dq; int n=points.size(); int res=INT_MIN; fo 阅读全文
posted @ 2020-06-28 17:15 feibilun 阅读(174) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: bool canArrange(vector<int>& arr, int k) { unordered_map<int,int> cnt; for(int i:arr){ cnt[(i%k+k)%k]++; } if(cnt[0]&1) 阅读全文
posted @ 2020-06-28 17:07 feibilun 阅读(79) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: int findDuplicate(vector<int>& nums) { int slow=0; int fast=0; while(true){ slow=nums[slow]; fast=nums[nums[fast]]; if(s 阅读全文
posted @ 2020-06-28 09:45 feibilun 阅读(100) 评论(0) 推荐(0) 编辑
摘要: link referenct to @617280219 Sort and group edges by weight. In each step we process one group of edges Discard the edges whose ends are already conne 阅读全文
posted @ 2020-06-28 08:39 feibilun 阅读(165) 评论(0) 推荐(0) 编辑