随笔分类 - ACM-点分治
摘要:题面 Problem description. You are given a tree. If we select 2 distinct nodes uniformly at random, what's the probability that the distance between thes
阅读全文
摘要:题面 Description There is a skyscraping tree standing on the playground of Nanjing University of Science and Technology. On each branch of the tree is a
阅读全文
摘要:题面 又是一堆废话,不挂了 题目链接https://vjudge.net/problem/HDU 5977 数据规模 Each of the following n 1 lines contains two integers u and v,meaning there is one edge bet
阅读全文
摘要:题面 Description 聪聪和可可是兄弟俩,他们俩经常为了一些琐事打起来,例如家中只剩下最后一根冰棍而两人都想吃、两个人都想玩儿电脑(可是他们家只有一台电脑)……遇到这种问题,一般情况下石头剪刀布就好了,可是他们已经玩儿腻了这种低智商的游戏。他们的爸爸快被他们的争吵烦死了,所以他发明了一个新游
阅读全文
摘要:题面 太长了不放了 链接:https://vjudge.net/problem/POJ 2114 题意 给定一颗树,m次询问,每次询问是否有路径长度为k的树 题解 和上题差不多,我们可以顺便把路径长度等于k的路径有多少条也算出来,大于0就有,等于0就没有 方法也是和上题一样,这题可以先合并长度相等的
阅读全文
摘要:题面 Description Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between node u a
阅读全文

浙公网安备 33010602011771号