#include using namespace std; ifstream f("dslm.in"); ofstream g("dslm.out"); int a[21][21],n,p, d[100], dmax[100],lgmax; void citire() { int i,x,y; f>>n>>p; while(f>>x>>y) a[x][y]=1; } void copie(int lg) { lgmax=lg; for(int i=1; i<=lg; i++) dmax[i]=d[i]; } void scrie_drum() { for(int i=1; i<=lgmax; i++) g<lgmax) copie(lg); } int main() { citire(); dfs(p,1); scrie_drum(); return 0; }