摘要: link class Solution { public: #define LL long long const int mod=1E9+7; int c[10015][15]; vector<int> waysToFillArray(vector<vector<int>>& queries) { 阅读全文
posted @ 2021-01-25 21:37 feibilun 阅读(67) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: struct State{ int mpos; int cpos; int turn; int win; State(int m, int c, int t, int w){ mpos=m; cpos=c; turn=t; win=w; } 阅读全文
posted @ 2021-01-18 12:16 feibilun 阅读(56) 评论(0) 推荐(0) 编辑
摘要: link 普通dp: class Solution { public: int n; int minimumTimeRequired(vector<int>& jobs, int k) { n=jobs.size(); vector<int> sum(1<<n); for(int i=1;i<(1< 阅读全文
posted @ 2021-01-11 18:44 feibilun 阅读(83) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: int boxDelivering(vector<vector<int>>& boxes, int portsCount, int maxBoxes, int maxWeight) { int n=boxes.size(); vector< 阅读全文
posted @ 2020-12-14 10:52 feibilun 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(102) 评论(0) 推荐(0) 编辑
摘要: select user_id, concat(upper(substring(u.name,1,1)),lower(substring(u.name,2))) as name from users u order by user_id -- CONCAT(str1, str2):字符连接函数 -- 阅读全文
posted @ 2020-12-09 09:34 feibilun 阅读(145) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: int minMoves(vector<int>& nums, int limit) { int n=nums.size(); vector<int> diff(2*limit+2); for(int i=0;i<n/2;i++){ int 阅读全文
posted @ 2020-11-30 16:14 feibilun 阅读(98) 评论(0) 推荐(0) 编辑
摘要: link /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NUL 阅读全文
posted @ 2020-11-24 09:02 feibilun 阅读(72) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: int memo[5][5][7][7][1<<10]; int getMaxGridHappiness(int m, int n, int introvertsCount, int extrovertsCount) { memset(me 阅读全文
posted @ 2020-11-16 09:36 feibilun 阅读(134) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: int n; int memo[50][1<<10]; bool canDistribute(vector<int>& nums, vector<int>& quantity) { vector<int> cnt(1001); n=quan 阅读全文
posted @ 2020-11-16 09:35 feibilun 阅读(127) 评论(0) 推荐(0) 编辑