摘要: Link Solution 1 Hungarian: class Solution { public: int m,n; vector<vector<int>> g; vector<vector<int>> dir={{0,-1},{-1,-1},{1,-1},{0,1},{-1,1},{1,1}} 阅读全文
posted @ 2020-02-11 09:55 feibilun 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Link #include <bits/stdc++.h> # define LL long using namespace std; const int mod=100000000; int M, N; int grid[12]; LL dp[12][1<<12]; LL dfs(int r, i 阅读全文
posted @ 2020-02-09 21:40 feibilun 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Link #include <bits/stdc++.h> # define LL long using namespace std; const int INF=0x7fffffff; int n; double x[16]; double y[16]; double dp[17][1<<16]; 阅读全文
posted @ 2020-02-09 20:42 feibilun 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Link Solution 0: class Solution { public: int m,n; int maxStudents(vector<vector<char>>& seats) { m=seats.size(); n=seats[0].size(); vector<vector<int 阅读全文
posted @ 2020-02-09 15:17 feibilun 阅读(270) 评论(0) 推荐(0) 编辑
摘要: Link class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { unordered_set<string> words; for(auto &s: 阅读全文
posted @ 2020-02-09 09:53 feibilun 阅读(163) 评论(0) 推荐(0) 编辑
摘要: link class Solution { public: vector<vector<string>> findLadders(string beginWord, string endWord, vector<string>& wordList) { vector<vector<string>> 阅读全文
posted @ 2020-02-09 09:20 feibilun 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题解: 如果不考虑长度限制,可以用二分图染色做。 #include <bits/stdc++.h> # define LL long using namespace std; int n; int a[2001]; int col[2001]; struct Edge{ int to; i 阅读全文
posted @ 2020-02-08 12:58 feibilun 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目链接 和leetcode一道题很像。。。 #include <bits/stdc++.h> # define LL long using namespace std; const int INF=0x7fffffff; const int maxn=50002; int n; int f[max 阅读全文
posted @ 2020-02-08 07:30 feibilun 阅读(258) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> # define LL long long using namespace std; const int INF=0x7fffffff; int n, m; struct Trie{ bool isword; int cnt; Trie* child 阅读全文
posted @ 2020-02-07 16:26 feibilun 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题解: 这道题太复杂了。。。主要是前两列最开始比较难想怎么做。 # Write your MySQL query statement below select t4.spend_date, t4.platform, if(t6.spend_date is null,0,t6.amount) 阅读全文
posted @ 2020-02-06 20:05 feibilun 阅读(273) 评论(0) 推荐(0) 编辑