随笔分类 - codeforces
摘要:##A. Grass Field ###思路: 只有4种情况,枚举一下即可 ###代码: #include <bits/stdc++.h> #define ll long long using namespace std; int t; int main () { cin >> t; while (
阅读全文
摘要:##A. The Third Three Number Problem ###题意: 给定一个数n,找到三个数a,b,c 使得 a xor b + b xor c + a xor c = n ###思路: 一般位运算的A题都是可以直接凑出来的,于是直接寻找特殊值,令 a = b = 0, c = x
阅读全文
摘要:##A XOR Mixup ###题意: 给定一个数组序列,输出其中一个元素x,使得数组其他元素的异或等于x ###思路: 算出数组的总异或x,遍历数组,如果a[i] xor x == a[i]就输出ai ###代码: #include <bits/stdc++.h> #define ll long
阅读全文