摘要: DescriptionGiven a rooted tree, each node has a boolean (0 or 1) labeled on it. Initially, all the labels are 0.We define this kind of operation: given a subtree, negate all its labels.And we want to query the numbers of 1's of a subtree.InputMultiple test cases.First line, two integerNandM, den 阅读全文
posted @ 2013-07-29 22:39 Oyking 阅读(292) 评论(0) 推荐(0)
摘要: Description"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story."Prince Remmarguts lives in his kingdom UDF – United Delta of Freedom. One day their neighboring country sent them Pri 阅读全文
posted @ 2013-07-29 15:41 Oyking 阅读(256) 评论(0) 推荐(0)