摘要: 原题链接 https://ac.nowcoder.com/acm/contest/4370/K 去年上海现场赛的一道签到题 太菜了对着这题自闭好久 现在看其实就是一道二分图判断奇环,唯一要思考的地方是怎么枚举可行的情况。解法是因为n很小所以可以二进制暴力枚举染色为1的点然后暴力判断(其实也不难想) 阅读全文
posted @ 2020-07-07 14:31 violet72 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 原题链接: https://codeforces.com/problemset/problem/85/E 很板子的一道题,二分+二分图判断。坑点是这道题点的个数比较多,建图的时候不能用临界表来存图,直接用临界矩阵来存就行。这样第一问就解决了。 第二问的话可以发现答案就是2的连通块数次方,对满足答案的 阅读全文
posted @ 2020-07-07 12:51 violet72 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目: S 城现有两座监狱,一共关押着 N 名罪犯,编号分别为1~N。 他们之间的关系自然也极不和谐。 很多罪犯之间甚至积怨已久,如果客观条件具备则随时可能爆发冲突。 我们用“怨气值”(一个正整数值)来表示某两名罪犯之间的仇恨程度,怨气值越大,则这两名罪犯之间的积怨越多。 如果两名怨气值为 c 的罪 阅读全文
posted @ 2020-07-07 12:41 violet72 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 网课是真的烦人,我不想学习,我只想打代码啊。 ———————————————————————————— 这题是2019湖南ccpc邀请赛的C题,比赛时的定位是一道银牌数据结构题。这场比赛是我人生第一场现场赛,现在回忆起来当时真的是惨不忍睹。。。。。。最搞笑的是我当时竟然对着这道题想了好久,还是在完全 阅读全文
posted @ 2020-02-25 20:53 violet72 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 第一次看到这题应该是在大一,当时想学一手莫队,但是由于过于菜(其实主要是心理上的原因)没有学成。 原题链接https://www.luogu.com.cn/problem/P1972 这道题的做法还算蛮多的,首先,这道题很明显的一道莫队的板子题,也可以用主席树来维护。我后来看了题解发现还可以巧妙的运 阅读全文
posted @ 2020-02-24 13:28 violet72 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Poj1151——Atlantis(Acwing247.亚特兰蒂斯) Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of 阅读全文
posted @ 2020-02-20 23:45 violet72 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题面: The main road in Bytecity is a straight line from south to north. Conveniently, there are coordinates measured in meters from the southernmost bui 阅读全文
posted @ 2020-01-15 14:03 violet72 阅读(222) 评论(1) 推荐(0) 编辑
摘要: 训练赛 ——第七届福建省大学生程序设计竞赛 rank 68/250 E - Card Game (Third Edition) 一号签到题 solved by mwh 16:05 =#include <stdio.h> #include <iostream> #include <cstring> # 阅读全文
posted @ 2019-11-27 17:08 violet72 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 令我感到非常自闭的一场div3 反正没打完就溜了 A - Payment Without Change 思维 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> 阅读全文
posted @ 2019-11-19 16:56 violet72 阅读(142) 评论(2) 推荐(1) 编辑
摘要: A - Single Push if 、 else 特判 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <queue> #include 阅读全文
posted @ 2019-11-19 16:24 violet72 阅读(227) 评论(0) 推荐(0) 编辑