Advertisement
Korotkodul

mosh c 1

Feb 27th, 2022 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <vector>
  4. #include <queue>
  5. #include <algorithm>
  6. #include <string>
  7. #include <stack>
  8. #include <set>
  9. #include <map>
  10. #define pii pair <int,int>
  11. #define vec vector
  12. using namespace std;
  13. using ll = long long;
  14. using ld = long double;
  15. using db = double;
  16. void cv(vector <int> &v){
  17. for (auto x: v){
  18. cout<<x<<' ';
  19. }
  20. cout<<"\n";
  21. }
  22.  
  23. void cvl(vector <ll> &v){
  24. for (auto x: v) cout<<x<<' ';
  25. cout<<"\n";
  26. }
  27.  
  28.  
  29. void cvv(vector <vector <int> > &v){
  30. for (auto x: v) cv(x);
  31. cout<<"\n";
  32. }
  33.  
  34. void cvb(vector <bool> v){
  35. for (bool x: v) cout<<x<<' ';
  36. cout<<"\n";
  37. }
  38.  
  39. void cvs(vector <string> v){
  40. for (auto a: v){
  41.  
  42. cout<<a<<"\n";
  43. }
  44. }
  45.  
  46. vector <int> crd = {0, 1, 2, 3};
  47.  
  48. vector <vector <int> > smp; //sample
  49.  
  50.  
  51. vector <vector <int> > pnt(int x, int y, vector <vector <int> > v){
  52.  
  53. }
  54.  
  55. vector <vector <pii> > ans;
  56.  
  57. void dfs(int dp, vector <vector <int> > v, vector <pii> cmd){
  58. if (v == smp){
  59. ans.push_back(cmd);
  60. }
  61. if (dp == 8) return;
  62. vector <vector <int> > hlp;
  63. for (int x = 0; x < n;++x){
  64. for (int y = 0; y < n;++y){
  65. vector <pii> hlp_cmd = cmd;
  66. hlp_cmd.push_back({x,y});
  67. hlp = pnt(x,y,v);
  68. dfs(dp+1, hlp, hlp_cmd);
  69. }
  70. }
  71. }
  72.  
  73.  
  74. int main()
  75. {
  76. ios::sync_with_stdio(0);
  77. cin.tie(0);
  78. cout.tie(0);
  79. int n; cin>>n;
  80. smp.resize(n, vector <int>(n,0));
  81. vector <pii> cmd = {};
  82. dfs(1, v, cmd); //так до 7-ми -- там перебираем вссе и смотрим -- dfs такой
  83. }
  84.  
  85. /*
  86. 16
  87. 6
  88. 5 4
  89. 5 10
  90. 12 7
  91. 15 13
  92. 12 11
  93. 9 1
  94.  
  95. 16
  96. 6
  97. 9 1
  98. 5 4
  99. 5 10
  100. 12 7
  101. 15 13
  102. 12 11
  103.  
  104.  
  105.  
  106. 16
  107. 5
  108. 5 4
  109. 5 10
  110. 12 7
  111. 15 13
  112. 12 11
  113. */
  114.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement