摘要: Description N个点M条边的无向图,询问保留图中编号在[l,r]的边的时候图中的联通块个数。 Input 第一行四个整数N、M、K、type,代表点数、边数、询问数以及询问是否加密。接下来M行,代表图中的每条边。接下来K行,每行两个整数L、R代表一组询问。对于type=0的测试点,读入的L 阅读全文
posted @ 2016-02-28 17:21 chenyushuo 阅读(486) 评论(0) 推荐(0) 编辑
摘要: Description Input 第一行有三个整数N、M和R,分别表示树的节点数、指令和询问总数,以及X国的据点。 接下来N-1行,每行两个整数X和Y,表示Katharon国的一条道路。 接下来M行,每行描述一个指令或询问,格式见题目描述。 Output 对于每个询问操作,输出所求的值。 Samp 阅读全文
posted @ 2016-02-28 15:36 chenyushuo 阅读(643) 评论(0) 推荐(0) 编辑
摘要: Description Nothing is more beautiful than square! So, given a grid of cells, each cell being black or white, it is reasonable to evaluate this grid’s 阅读全文
posted @ 2016-02-28 10:41 chenyushuo 阅读(322) 评论(0) 推荐(0) 编辑