摘要:
"传送门" A. Paint the Numbers 签到。 Code cpp include using namespace std; typedef long long ll; const int N = 105; int n; int a[N], b[N]; char s[N]; int ma 阅读全文
摘要:
"传送门" A. Yellow Cards 细心点即可。 Code cpp include define fi first define se second define MP make_pair using namespace std; typedef long long ll; typedef 阅读全文
摘要:
"传送门" 题意: 给出$n$个数$a_i$,现在要将其分为两堆,使得这两堆数的异或和相加最大。 思路: 考虑线性基贪心求解。 但直接上线性基求出一组的答案是行不通的,原因之后会说。 注意到如果二进制中某一位$1$的个数出现了奇数次,那么无论怎么分,都会有一组中这位为$1$;对于出现偶数次的位,两组 阅读全文