Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <iomanip>#include <sstream>#include <string>#include <cstring>#include <vector>#include <list>#include <set>#include <stack>#include <queue>#include <map>#include <utility>#include <algorithm>using namespace std;const int MAXN = 1005;struct row {int childId; // 子菜单指针int expandLength; // 子菜单长度row():childId(-1),expandLength(0) {};row(int _id):childId(_id),expandLength(0) {};};struct section {vector< row > rows; // 包含的row情况int selfLength; // 自身的长度 s1