Live2d Test Env

随笔分类 -  树上乱搞---倍增

摘要:Description 给您一颗树,每个节点有个初始值。 现在支持以下两种操作: 1. C i x(0<=x<2^31) 表示将i节点的值改为x。 2. Q i j x(0<=x<2^31) 表示询问i节点到j节点的路径上有多少个值为x的节点。 给您一颗树,每个节点有个初始值。 现在支持以下两种操作 阅读全文
posted @ 2018-11-12 13:43 nimphy 阅读(404) 评论(0) 推荐(0) 编辑
摘要:There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to 阅读全文
posted @ 2017-12-24 21:08 nimphy 阅读(482) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示