随笔分类 - BFS
摘要: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; }
阅读全文
摘要:link #include <bits/stdc++.h> # define LL long long using namespace std; struct Edge{ int to; int next; }e1[500010], e2[500010]; int head1[100010]; in
阅读全文
摘要:link Solution 1 : min cost flow Break each cell into two nodes i and i', connect i to i' (i+mn) with an edge with flow 1, cost 0. For each cell i, con
阅读全文
摘要: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>>
阅读全文

浙公网安备 33010602011771号