摘要:
You're given a tree on N vertices. Each vertex has a positive integer written on it, number on the ith vertex being vi. Your program must process two 阅读全文
摘要:
F. Heroes of Making Magic III time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output F. Heroes 阅读全文
摘要:
2243: [SDOI2011]染色 Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1、将节点a到节点b路径上所有点都染成颜色c; 2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段), 如“112221”由3段组成:“11”、“222”和“1”。 请 阅读全文