02 2021 档案

摘要:链接:https://www.luogu.com.cn/problem/P1991 虽然实现起来是套一个最小生成树模板,但想简单写一下看法。为什么有s个卫星电话就能减去最大的s-1条边呢?首先我们给生成树最大边的两个端点用上卫星电话,同时去掉最大边。接下来,对于目前生成树的最大边,假设有一个端点有卫 阅读全文
posted @ 2021-02-28 22:47 yanying 阅读(83) 评论(0) 推荐(0)
摘要:A: 题意:给出原价A和折扣价B,求打折的百分比数。 1 #include <iostream> 2 #include <cstdio> 3 #include <vector> 4 #include <algorithm> 5 #include <queue> 6 #include <vector> 阅读全文
posted @ 2021-02-28 00:32 yanying 阅读(81) 评论(0) 推荐(0)
摘要:传送门:https://atcoder.jp/contests/abc192 A: 题意:现在有X枚硬币,要使硬币数为100的倍数还需要多少枚硬币(如果X已经为100的倍数不算)。 1 #include <iostream> 2 #include <cstdio> 3 #include <vecto 阅读全文
posted @ 2021-02-21 13:53 yanying 阅读(131) 评论(0) 推荐(0)