
数据结构-并查集
Mitsuha_
Rush to the dead summer
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces-1131D:Gourmet choice(拓扑+并查集)
D. Gourmet choice time limit per test 2 seconds memory limit per test 256 megabytes inputstandard input outputstandard output Mr. Apple, a gourmet, works as editor-in-chief of a gastronomic periodical...原创 2019-02-24 11:30:29 · 756 阅读 · 0 评论 -
Lyft Level 5 Challenge 2018 - Final Round:F. Deduction Queries(带权并查集)
F. Deduction Queries time limit per test 2 seconds memory limit per test 256 megabytes inputstandard input outputstandard output There is an array a of 2302^{30}230 integers, indexed from 0 to 230−12^...原创 2018-11-09 11:27:20 · 387 阅读 · 0 评论 -
ACM-ICPC 2017 Asia Urumqi: I. A Possible Tree(带权并查集)
Alice knows that Bob has a secret tree (in terms of graph theory) with n nodes with n -1n−1 weighted edges with integer values in [0, 260 - 1][0,260−1]. She knows its structure but does not know the s...原创 2018-05-23 13:13:58 · 738 阅读 · 0 评论 -
第十四届华中科技大学程序设计竞赛决赛-A:Beauty of Trees(带权并查集)
链接:https://www.nowcoder.com/acm/contest/119/A 来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 It’s universally acknowledged that there’re innumerable trees in ...原创 2018-05-07 23:05:29 · 516 阅读 · 0 评论 -
hihocoder#1711 : 评论框排版(带权并查集+set)
时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi正在给hihoCoder的查看代码添加评论功能。用户可以对某一行代码进行评论,评论发表之后会在代码右侧插入一个评论框。#include <iostream> using namespace std; int n; long long a[100010], s[100010]; +------------...原创 2018-03-18 22:49:16 · 347 阅读 · 0 评论 -
Codeforces-939D:Love Rescue(并查集)
D. Love Rescuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya took ...原创 2018-02-17 22:57:45 · 560 阅读 · 0 评论 -
Codeforces-292D:Connected Components(m个并查集)
Codeforces-292D:Connected Components(m个并查集)We already know of the large corporation where Polycarpus works as a system administrator. The computer network there consists of ncomputers and m cables that connect some pairs of computers. In other words, the c原创 2017-10-27 12:56:29 · 489 阅读 · 0 评论 -
WUST OJ 1481: divide into groups(二分)
WUST OJ 1481: divide into groups(二分)一条路上站着许多人,没有两个人站在同一个坐标下。要将相互是朋友的人分到且必须分到同一组,不是朋友的两个人不允许分到同一组。 两个人至少满足以下一条规则就是朋友: 1.A,B一开始就是朋友 2.如果A和B是朋友,A和C是朋友,那么B和C也是朋友 3.如果A和B的距离不超过L,那么A和B自动成为朋友 现在wh想求出最小的L,使分组的组数为m。请帮助他求出最小的L。^_^原创 2017-10-07 11:44:53 · 519 阅读 · 0 评论 -
hihocoder #1515 : 分数调查
hihocoder #1515 : 分数调查 小Hi的学校总共有N名学生,编号1-N。学校刚刚进行了一场全校的古诗文水平测验。 学校没有公布测验的成绩,所以小Hi只能得到一些小道消息,例如X号同学的分数比Y号同学的分数高S分。 小Hi想知道利用这些消息,能不能判断出某两位同学之间的分数高低?原创 2017-08-12 12:02:42 · 542 阅读 · 0 评论