摘要: Description You have $N$ integers, $A_1, A_2, ... , A_N$. You need to deal with two kinds of operations. One type of operation is to add some given nu 阅读全文
posted @ 2019-08-12 22:30 wuli涛涛 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 2019 杭电多校 7 1006 题目链接: "HDU 6651" 比赛链接: "2019 Multi University Training Contest 7" Problem Description Final Exam is coming! Cuber QQ has now one nigh 阅读全文
posted @ 2019-08-12 20:43 wuli涛涛 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 题目链接: "Watch Where You Step" 题意 给定有向图的邻接矩阵,现在需要给该图增加边,使得如果两点可达必直接可达,求需要加边的数量。 题解 首先,如果给定 $n$ 个结点的图中任意两点均可达,那么需要增加的边数为有向完全图的边数 $n (n 1) $ 原来有的边数。 所以先将图 阅读全文
posted @ 2019-08-12 10:48 wuli涛涛 阅读(239) 评论(0) 推荐(0) 编辑