Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <vector>
- #include <queue>
- #include <algorithm>
- #include <string>
- #include <stack>
- #include <set>
- #include <map>
- #define pii pair <int,int>
- #define vec vector
- using namespace std;
- using ll = long long;
- using ld = long double;
- using db = double;
- void cv(vector <int> &v){
- for (auto x: v){
- cout<<x<<' ';
- }
- cout<<"\n";
- }
- void cvl(vector <ll> &v){
- for (auto x: v) cout<<x<<' ';
- cout<<"\n";
- }
- void cvv(vector <vector <int> > &v){
- for (auto x: v) cv(x);
- cout<<"\n";
- }
- void cvb(vector <bool> v){
- for (bool x: v) cout<<x<<' ';
- cout<<"\n";
- }
- void cvs(vector <string> v){
- for (auto a: v){
- cout<<a<<"\n";
- }
- }
- vector <int> crd = {0, 1, 2, 3};
- vector <vector <int> > smp; //sample
- vector <vector <int> > pnt(int x, int y, vector <vector <int> > v){
- }
- vector <vector <pii> > ans;
- void dfs(int dp, vector <vector <int> > v, vector <pii> cmd){
- if (v == smp){
- ans.push_back(cmd);
- }
- if (dp == 8) return;
- vector <vector <int> > hlp;
- for (int x = 0; x < n;++x){
- for (int y = 0; y < n;++y){
- vector <pii> hlp_cmd = cmd;
- hlp_cmd.push_back({x,y});
- hlp = pnt(x,y,v);
- dfs(dp+1, hlp, hlp_cmd);
- }
- }
- }
- int main()
- {
- ios::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- int n; cin>>n;
- smp.resize(n, vector <int>(n,0));
- vector <pii> cmd = {};
- dfs(1, v, cmd); //так до 7-ми -- там перебираем вссе и смотрим -- dfs такой
- }
- /*
- 16
- 6
- 5 4
- 5 10
- 12 7
- 15 13
- 12 11
- 9 1
- 16
- 6
- 9 1
- 5 4
- 5 10
- 12 7
- 15 13
- 12 11
- 16
- 5
- 5 4
- 5 10
- 12 7
- 15 13
- 12 11
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement