#include <iostream> #include <string> #include <vector> #include <unordered_set> using namespace std; /* 思路:n=2, m = {1,2},x = {2,1}, 因此 0,1 = 1 + 0, 2 = 1+ 1 或0+2,3 = 1+2, 4 = 1*2 + 2, 因此{0,1,2,3,4},共5种 出现重复需要去重,unordered_set方法 */ int accountNums(vector<int> weight, ...