Day10 - C - Blow up the city HDU - 6604】的更多相关文章

Country A and B are at war. Country A needs to organize transport teams to deliver supplies toward some command center cities. In order to ensure the delivery works efficiently, all the roads in country A work only one direction. Therefore, map of co…
Blow up the city 时间限制: 1 Sec  内存限制: 128 MB 题目描述 Country A and B are at war. Country A needs to organize transport teams to deliver supplies toward some command center cities. In order to ensure the delivery works efficiently, all the roads in country…
题意:给定一个n点m边的DAG,将只有入边的点称为周驿东点 q次询问,每次给定a,b两点,询问删去某个点x和其相连的所有边,能使a,b至少其中之一不能到达任何周驿东点的x的个数 n,q<=1e5,m<=2e5 思路: #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef…
B.Blow up the city solved by F0_0H 210min 题意 给一个DAG,每次询问给定u,v,求使得u或v不能与中心点联通的关键点个数 做法 按照拓扑序建树 新加节点的父亲为该节点前驱的lca 查询答案,只需输出u,v两点深度,减去lca深度 G. Find the answer solved by rdc 50min -2 题意:查询区间内至多几个数字之和小于等于 m. 做法:权值线段树.…
牛客第一场 (通过)Integration (https://ac.nowcoder.com/acm/contest/881/B) (未补)Euclidean Distance (https://ac.nowcoder.com/acm/contest/881/C) (未补)Parity of Tuples (https://ac.nowcoder.com/acm/contest/881/D) (已补)ABBA (https://ac.nowcoder.com/acm/contest/881/E)…
F - City Game Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1505 Appoint description: Description Bob is a strategy game programming specialist. In his new city building game the gaming enviro…
City Planning Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 483    Accepted Submission(s): 203 Problem Description After many years, the buildings in HDU has become very old. It need to rebuil…
City Planning Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 503    Accepted Submission(s): 213 Problem Description After many years, the buildings in HDU has become very old. It need to rebui…
The plan of city rebuild Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 616    Accepted Submission(s): 215 Problem Description News comes!~City W will be rebuilt with the expectation to become…
题目链接: Hdu 5352 MZL's City 题目描述: 有n各节点,m个操作.刚开始的时候节点都是相互独立的,一共有三种操作: 1:把所有和x在一个连通块内的未重建过的点全部重建. 2:建立一条双向路(x,y) 3:又发生了地震,p条路被毁. 问最后最多有多少个节点被重建,输出重建节点的最小字典序. 解题思路: 这几天正好在学匹配,但是昨天下午还是没有看出来这个是匹配题目.看了题解扪心自问了自己三次,是不是傻.就是把每个需要重建的节点x拆成k个点,然后对每个拆分后的点和与拆点在同一连通块…