随笔分类 - 图论
摘要:4316: 小C的独立集 Description 图论小王子小C经常虐菜,特别是在图论方面,经常把小D虐得很惨很惨。 这不,小C让小D去求一个无向图的最大独立集,通俗地讲就是:在无向图中选出若干个点,这些点互相没有边连接,并使取出的点尽量多。 小D虽然图论很弱,但是也知道无向图最大独立集是npc,但
阅读全文
摘要:Matching In Multiplication Problem DescriptionIn the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divid
阅读全文
摘要:题意 百度地图上有n个城市,城市编号依次为1到n。地图中有若干个城市群,编号依次为1到m。每个城市群包含一个或多个城市; 每个城市可能属于多个城市群,也可能不属于任何城市群。 地图中有两类道路。第一类道路是 城市之间的快速路,两个城市u,v之间增加一条距离为c的边;第二类道路是城市群之间的高速路,
阅读全文
摘要:E. Scheme To learn as soon as possible the latest news about their favourite fundamentally new operating system, BolgenOS community from Nizhni Tagil
阅读全文
摘要:1808: 地铁 Description Bobo 居住在大城市 ICPCCamp。 ICPCCamp 有 n 个地铁站,用 1,2,…,n 编号。 m 段双向的地铁线路连接 n 个地铁站,其中第 i 段地铁属于 ci 号线,位于站 ai,bi 之间,往返均需要花费 ti 分钟(即从 ai 到 bi
阅读全文
摘要:D. Directed Roads D. Directed Roads ZS the Coder and Chris the Baboon has explored Udayland for quite some time. They realize that it consists of n to
阅读全文
摘要:Balancing Act Description Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collect
阅读全文
摘要:Warm up Problem Description N planets are connected by M bidirectional channels that allow instant transportation. It's always possible to travel betw
阅读全文
摘要:zxa and leaf Problem Description zxa have an unrooted tree with n nodes, including (n−1) undirected edges, whose nodes are numbered from 1 to n. The d
阅读全文
摘要:Park Visit Problem Description Claire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N f
阅读全文
摘要:很久很久之前,森林里住着一群兔子。有一天,兔子们突然决定要去看樱花。兔子们所在森林里的樱花树很特殊。樱花树由n个树枝分叉点组成,编号从0到n-1,这n个分叉点由n-1个树枝连接,我们可以把它看成一个有根树结构,其中0号节点是根节点。这个树的每个节点上都会有一些樱花,其中第i个节点有c_i朵樱花。樱花
阅读全文
摘要:在 W 星球上有 n 个国家。为了各自国家的经济发展,他们决定在各个国家之间建设双向道路使得国家之间连通。但是每个国家的国王都很吝啬,他们只愿意修建恰好 n – 1条双向道路。 每条道路的修建都要付出一定的费用, 这个费用等于道路长度乘以道路两端的国家个数之差的绝对值。例如,在下图中,虚线所示道路两
阅读全文
摘要:B. Longtail HedgehogThis Christmas Santa gave Masha a magic picture and a pencil. The picture consists ofnpoints connected bymsegments (they might cro...
阅读全文
摘要:1143: [CTSC2008]祭祀riverDescription在遥远的东方,有一个神秘的民族,自称Y族。他们世代居住在水面上,奉龙王为神。每逢重大庆典, Y族都会在水面上举办盛大的祭祀活动。我们可以把Y族居住地水系看成一个由岔口和河道组成的网络。每条河道连接着两个岔口,并且水在河道内按照一个固...
阅读全文
摘要:D. Lazy StudentStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a grap...
阅读全文
摘要:D. New Year Santa NetworkNew Year is coming in Tree World! In this world, as the name implies, there arencities connected byn - 1roads, and for any tw...
阅读全文
摘要:D. Super MAri the monster is not an ordinary monster. She is the hidden identity of Super M, the Byteforces’ superhero. Byteforces is a country that c...
阅读全文
摘要:Difference of ClusteringProblem DescriptionGiven two clustering algorithms, the old and the new, you want to find the difference between their results...
阅读全文
摘要:1179: [Apio2009]AtmTime Limit:15 SecMemory Limit:162 MBSubmit:2069Solved:826[Submit][Status][Discuss]DescriptionInput第一行包含两个整数N、M。N表示路口的个数,M表示道路条数。接下来...
阅读全文
摘要:Ponds Time Limit: 1500/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others) Probl...
阅读全文

浙公网安备 33010602011771号