2017年9月28日

Codeforces 862 C. Mahmoud and Ehab and the xor 位运算

摘要: 题目链接: http://codeforces.com/problemset/problem/862/C 题目描述: 给你n, k 找到一个大小为n的集合, 使得集合异或等于k 解题思路: 自己一开始想的思路是有一个数必须是x, 剩下的异或为0, 想了好久没有什么思路.......看代码吧, 不复杂 阅读全文

posted @ 2017-09-28 21:12 FriskyPuppy 阅读(149) 评论(0) 推荐(0) 编辑

Codeforces 435 B Mahmoud and Ehab and the bipartiteness 二分图的最大匹配问题

摘要: 题目链接: http://codeforces.com/contest/862/problem/B 题目描述: 给一个图, 问最多连多少线, 可以作为二分图 解题思路: 求二分图的最大匹配, DFS 代码: #include <iostream> #include <cstdio> #include 阅读全文

posted @ 2017-09-28 21:07 FriskyPuppy 阅读(228) 评论(0) 推荐(0) 编辑

Codeforces 862 A Mahmoud and Ehab and the MEX 水题

摘要: 题目链接: http://codeforces.com/contest/862/problem/A 题目描述: 找到一个集合中没出现的最小的数, 可以做的操作是删除, 或者添加一个, 问最少做多少次 解题思路: 水题 代码: #include <iostream> #include <cstdio> 阅读全文

posted @ 2017-09-28 21:01 FriskyPuppy 阅读(103) 评论(0) 推荐(0) 编辑

导航