2013年3月31日

ZOJ Monthly, March 2013 - A A Simple Tree Problem

摘要: http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=4959题意:给一棵树,树的每个节点初始值为0,要求支持两种操作:o k : 将k下的子树值取反q k : 查询k下的子树值有多少个为1思路:化树结构为线性,每个点管理一个区间。View Code #include <stdio.h>#include <string.h>#include <stdlib.h>#include <iostream>#include <algorithm>using name 阅读全文

posted @ 2013-03-31 17:12 aigoruan 阅读(441) 评论(0) 推荐(1)

导航