text: * to get 50 points, you need to find any (not necessarily simple) path of length at most 2·n, that meets the attributes described above (subproblem E1); * to get 50 more points, you need to count for each length from 1 to 2·n the number of paths that have the attribute described above (subproblem E2).Output Subproblem E1.In the first line print an integer k (1 ≤ k ≤ 2·n) — the numbers of shops on Neo's path.In the next line print k integers — the number of shops in the order Neo passes them.If the graph doesn't have such paths or the length of the shortest path includes more than 2·n shops, print on a single line 0.Subproblem E2.Print 2·n lines.The i-th line must contain a single integer — the number of required paths of length i modulo 1000000007 (109 + 7).Examples Input 6 6 1 2 2 1 2 2 3 1 3 3 4 2 4 5 4 5 0 5 3 1 3 6 1 1 6 Output 4 6 1 2 3 Input 6 6 1 2 2 1 2 2 3 1 3 3 4 2 4 5 4 5 0 5 3 1 3 6 1 1 6 Output 1 2 1 1 2 1 1 2 1 1 2 1 Note The input in both samples are the same.The first sample contains the answer to the first subproblem, the second sample contains the answer to the second subproblem.# Solution #include <bits/stdc++.h> using namespace std; const int MAX = 100 + 10; const int Mod = (int)1e9 + 7; int n, m; int g[MAX][MAX], can[MAX][MAX]; vector<int> p[MAX][MAX]; int get(vector<int> &before, int kind, int could, int have) { int j; int now = 0, cc = have; for (; now < (int)before.size(); now++) { if (now + 1 == (int)before.size()) break; int a = before[now]; int b = before[now + 1]; if (g[a][b] != kind || (!could && can[a][b])) return 0; vector<int> &nL = p[a][b]; for ((j) = (0); (j) != ((int)nL.size()); ++(j)) { if (cc < (int)before.size()) { if (nL[j] == before[cc]) cc++; else return 0; } else { while (j < (int)nL.size()) { before.push_back(nL[j++]); if ((int)before.size() > 2 * n + 1) return 0; } cc = before.size(); break; } } } return cc == (int)before.size(); } int isCan(int a, int b) { int i; vector<int> &L = p[a][b]; int len = L.