stack<int> a; 
for (int d7 = fini; d7 != 0; d7 = parent[d7]) {
        a.push(a[d7]);
}
for (int d7=1;d7<=ans;d7++) {
	cout << a.top() << " ";
	a.pop();
}

haihaihai

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注