C++ unordered_map + bitmask
```\n        vector pbit = {0};\n        for(int i=0; i<10; i++) pbit.push_back(1<<i);\n        unordered_map bitmap; //bit, index\n        bitmap[0] = -1;\n   
```\n        vector<int> pbit = {0};\n        for(int i=0; i<10; i++) pbit.push_back(1<<i);\n        unordered_map<int, int> bitmap; //bit, index\n        bitmap[0] = -1;\n        int res = 0, bits = 0;\n        for(int i=0; i<s.size(); i++){\n            bits ^= (1<<(s[i]-\'0\'));\n            for(auto x:pbit){\n                auto it = bitmap.find(bits ^ x);\n                if(it != bitmap.end()){\n                    res = max(res, i - it->second);\n                }\n            }\n            if(!bitmap.count(bits)) bitmap[bits] = i;\n        }\n        return res;\n    }
[]