#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#define print(k) cout<<#k"="<<k<<endl;
#define LL long long
using namespace std;
struct Son
{
LL n,next;
}son[110];
struct Node
{
LL v,p,head;
}node[110];
LL ans[110][110],n,k,root;
void dfs(LL n)
{
LL i,j,t,s=node[n].head;
ans[n][1]=node[n].v;
while(s>=0)
{
dfs(son[s].n);
for(j=k;j>1;j--)
{
for(t=1;t<......
阅读全文