上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页
摘要: Navigation Nightmare Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000 阅读全文
posted @ 2020-07-10 18:43 SummerMingQAQ 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Parity game Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a 阅读全文
posted @ 2020-07-10 00:26 SummerMingQAQ 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Supermarket A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as a 阅读全文
posted @ 2020-07-09 22:39 SummerMingQAQ 阅读(207) 评论(0) 推荐(0) 编辑
摘要: True Liars After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he wa 阅读全文
posted @ 2020-07-08 20:18 SummerMingQAQ 阅读(261) 评论(0) 推荐(0) 编辑
摘要: How Many Answers Are Wrong TT and FF are ... friends. Uh... very very good friends -________-b FF is a bad boy, he is always wooing TT to play the fol 阅读全文
posted @ 2020-07-08 19:48 SummerMingQAQ 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 传送门 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <queue> 5 #include <vector> 6 #include <cmath> 7 8 using namespace std 阅读全文
posted @ 2020-07-06 22:05 SummerMingQAQ 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 0 or 1 题目: Given a n*n matrix C ij (1<=i,j<=n),We want to find a n*n matrix X ij (1<=i,j<=n),which is 0 or 1. Besides,X ij meets the following conditi 阅读全文
posted @ 2020-07-04 20:33 SummerMingQAQ 阅读(168) 评论(0) 推荐(0) 编辑
摘要: The Suspects 题目:编号为0的人有传染病,同组中只要有一个人有传染病,该组的人都被看做有传染病,一个人可以在多组中,问有多少人有传染病。 思路:并查集,需要压缩并查集的树,编号小的点优先作为祖先(0为root),并查集过程中传递祖先的同时传递祖先是否是病人,最后再次遍历所有人,使得祖先是 阅读全文
posted @ 2020-07-04 00:43 SummerMingQAQ 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Wireless Network 思路:并查集,如果两个点可以相互传达,就是两个集合的合并,当然,前提是要两个点都被维修过。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <queue> 5 # 阅读全文
posted @ 2020-07-03 15:16 SummerMingQAQ 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Marriage Match IV 思路:属于最短路径上的边应该满足:dis_A[u] + dis_B[v] + w == dis_A[B],dis_A是出发点到其他点的距离,dis_B是终点到其他点的距离,u,v是边的两个端点,w是权值。题目说每条边只能用一次,我们可以用最大流算法来求最短路径有几 阅读全文
posted @ 2020-07-01 17:14 SummerMingQAQ 阅读(180) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页