#include using namespace std; int x[10] ,n, poz[10]; int nrsol=0; ofstream fout("shuffle.out"); int Vecine(int a,int b){ if(poz[a]-poz[b]==1 || poz[a]-poz[b]==-1) return 1; return 0; } int OK(int k){ if(k==1) return 1; for(int i=1;i>n; for(int i=1;i<=n;++i){ int x; fin >> x; poz[x] = i; } fin.close(); back(1); if(nrsol == 0) fout << "nu exista"; fout.close(); return 0; }