摘要:
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}} 阅读全文
摘要:
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 阅读全文
摘要:
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]; 阅读全文
摘要:
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 阅读全文
摘要:
Link class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { unordered_set<string> words; for(auto &s: 阅读全文
摘要:
link class Solution { public: vector<vector<string>> findLadders(string beginWord, string endWord, vector<string>& wordList) { vector<vector<string>> 阅读全文
摘要:
题目链接 题解: 如果不考虑长度限制,可以用二分图染色做。 #include <bits/stdc++.h> # define LL long using namespace std; int n; int a[2001]; int col[2001]; struct Edge{ int to; i 阅读全文
摘要:
题目链接 和leetcode一道题很像。。。 #include <bits/stdc++.h> # define LL long using namespace std; const int INF=0x7fffffff; const int maxn=50002; int n; int f[max 阅读全文
摘要:
#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 阅读全文
摘要:
题目链接 题解: 这道题太复杂了。。。主要是前两列最开始比较难想怎么做。 # Write your MySQL query statement below select t4.spend_date, t4.platform, if(t6.spend_date is null,0,t6.amount) 阅读全文