题目链接:https://www.51nod.com/contest/problem.html#!problemId=1622 第一次参加算法马拉松,我就是去看大神们疯狂秒题,然后感受绝望的orz.. 题解: 设M = P xor A,则 M∈A,M是P的补集,M与P一一对应. 设N = Q xor B,则 N∈B,N是B的补集,N与B一一对应. 所以(P xor A)xor(Q xor B) = M xor N = A xor B 即求有多少对(M,N),M∈A,N∈B,满足上式. 因为属于A…
The Korea Defense and Science Institute, shortly KDSI, has been putting constant effort into newequipment for individual soldiers for recent years, and at last released N new types of equipment.KDSI has already done evaluation of each of the N types…
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1086 思路 裸的多重背包 巩固一下刚学的骚操作 #include<bits/stdc++.h> using namespace std; ; int w[maxn],p[maxn],c[maxn];//分别表示 体积 价值和数量 ]; int main () { int n,W; cin >> n >> W; ;i<=n;i++) ci…