Advertisement
TrickmanOff

Untitled

Dec 6th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <fstream>
  4. #include <vector>
  5. #include <queue>
  6. #include <functional>
  7. #include <set>
  8. #include <map>
  9. #include <math.h>
  10. #include <cmath>
  11. #include <string>
  12. #include <time.h>
  13. #include <random>
  14. #include <unordered_set>
  15. #include <unordered_map>
  16. #include <bitset>
  17. #include <string.h>
  18. #include <stack>
  19. using namespace std;
  20. //
  21. #define fast cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0);
  22. #define cin in
  23. #define cout out
  24. #define pii pair<int,int>
  25. #define ll long long
  26. #define db double
  27. #define ld long double
  28. #define uset unordered_set
  29. #define umap unordered_map
  30. #define F first
  31. #define S second
  32. #define vec vector
  33. #define ms multiset
  34. #define pb push_back
  35. #define pll pair<ll,ll>
  36. #define pdd pair<ld, ld>
  37. #define pq priority_queue
  38. #define umap unordered_map
  39. #define uset unordered_set
  40. #define pii pair<int, int>
  41. #define pll pair<ll, ll>
  42. #define pnn pair<Node*, Node*>
  43. #define uid uniform_int_distribution
  44.  
  45. ifstream in("input.txt");
  46. ofstream out("output.txt");
  47.  
  48. //куда ведёт парсоч влево
  49. vector<int> m;
  50. vector<bool> used;
  51. vector<vector<int>> g;
  52.  
  53. bool try_kuhn(int v) {
  54.     if (used[v]) return 0;
  55.     used[v] = 1;
  56.  
  57.     for (int to : g[v]) {
  58.         if (m[to] == -1 || try_kuhn(m[to])) {
  59.             m[to] = v;
  60.             return 1;
  61.         }
  62.     }
  63.  
  64.     return 0;
  65. }
  66.  
  67. void
  68.  
  69. int main() {
  70.  
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement