随笔分类 -  并查集

摘要:传送门 题目 S 城现有两座监狱,一共关押着N 名罪犯,编号分别为1~N。他们之间的关系自然也极不和谐。很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。如果两名怨气值为c 的罪犯被关 阅读全文
posted @ 2018-05-18 13:52 水题收割者 阅读(373) 评论(0) 推荐(0)
摘要:链接 http://codeforces.com/contest/123/problem/A 题目 You are given a string s, consisting of small Latin letters. Let's denote the length of the string a 阅读全文
posted @ 2017-10-26 22:54 水题收割者 阅读(317) 评论(0) 推荐(1)