树上计算 Problem:1330 Time Limit:1000ms Memory Limit:65535K Description 给出一棵以 1 为根的树,初始每个顶点的权值为 0 。现有两种操作: 1 x 代表将顶点 x 的权值加一 2 x 询问顶点 x 的子树(包含x本身)的权值和是多少 Input 第一行样例个数
【题目】 Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees, factories and