随笔分类 -  图论---并查集&缩点

摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6832 CSDN园食用链接:https://blog.csdn.net/qq_43906000/article/details/107870347 An undirected connected grap 阅读全文
posted @ 2020-08-07 21:12 lonely_wind 阅读(195) 评论(0) 推荐(0)
摘要:CSDN食用链接:https://blog.csdn.net/qq_43906000/article/details/107797019 题目大意:给你T组数据,每组数据给你n对数,分别表示为$a_i,b_i(1\leq a_i,b_i\leq 10^9)$,你每次都可以取其中的一个,但如果之前$a 阅读全文
posted @ 2020-08-04 20:02 lonely_wind 阅读(156) 评论(0) 推荐(0)
摘要:题目链接:https://codeforces.com/problemset/problem/734/E CSDN食用链接:https://blog.csdn.net/qq_43906000/article/details/107738495 Anton is growing a tree in h 阅读全文
posted @ 2020-08-01 23:29 lonely_wind 阅读(171) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6763 CSDN食用链接:https://blog.csdn.net/qq_43906000/article/details/107605348 Problem Description There are 阅读全文
posted @ 2020-07-27 10:16 lonely_wind 阅读(244) 评论(0) 推荐(0)
摘要:题目大意:给你n个点,m条边,现在有q次操作,每次一个x,表示将与x所连的所有点归并到x团里面,问最后每个点属于哪个团。 输入 5 4 3 0 1 1 2 2 3 4 0 1 3 0 4 3 0 1 1 2 2 3 2 0 2 4 3 0 1 1 2 2 3 2 0 3 4 1 1 3 1 2 5 阅读全文
posted @ 2020-07-21 10:30 lonely_wind 阅读(195) 评论(0) 推荐(0)
摘要:比赛链接:http://acm.csust.edu.cn/contest/91 Update:2020.4.28-更新了I题摸鱼的tomjobs的某些证明和E题恶心心的题的优化及坑点说明 emmm,这个榜有点惨,不过比我们去年到是好多了。。。有一题数据出了点水,导致写了应该就能过,要不是我在各位打完 阅读全文
posted @ 2020-04-27 23:35 lonely_wind 阅读(531) 评论(1) 推荐(1)
摘要:emmm,没什么比较难的题,都比较签到,我觉得这场应该是你们最接近AK的一次 题目链接:http://acm.csust.edu.cn/contest/74 比赛过后题目无法提交,请到problem中提交 题目说明: 数论king(思维) 厂里数论王(思维+前缀和) 暴力出奇迹(贪心) 打包商品(并 阅读全文
posted @ 2020-03-15 14:54 lonely_wind 阅读(280) 评论(1) 推荐(1)
摘要:题目链接:https://codeforces.com/contest/1291 A - Even But Not Even 题目大意:定义ebne类型,如果一个数本身不是2的倍数,且所有数字的和为2的倍数记为ebne。现在给你一个长度小于等于3000的数字,判断是否能通过删除操作将其变为ebne类 阅读全文
posted @ 2020-02-03 17:23 lonely_wind 阅读(370) 评论(0) 推荐(0)
摘要:Time Limit: 1 Sec Memory Limit: 162 MB 洛谷:时间限制1.00s 内存限制125.00MB 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1016 洛谷:https://www.luogu.com.c 阅读全文
posted @ 2020-02-02 20:31 lonely_wind 阅读(239) 评论(0) 推荐(0)
摘要:Time Limit: 3 Sec Memory Limit: 162 MB 洛谷:时间限制1.00s 内存限制125.00MB 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=1015 洛谷:https://www.luogu.com.c 阅读全文
posted @ 2020-02-01 21:38 lonely_wind 阅读(175) 评论(0) 推荐(0)
摘要:题目链接:http://acm.csust.edu.cn/problem/3029 Description ——你要是愿意,我就永远存在 某人的朋友圈实在是过于庞大且复杂,要判断两个人是不是朋友,那还真不容易。 现给出某个朋友圈关系图,求任意给出的两个人是否是朋友。 规定:如果x和yy是朋友,y和z 阅读全文
posted @ 2019-12-15 18:20 lonely_wind 阅读(362) 评论(0) 推荐(0)