[C++] runtime: 68 ms, faster than 99.78%; memory 35.7 MB, less than 99.38%
\n// Live coding problems, watch at\n// https://www.twitch.tv/yipcubed\n// https://www.youtube.com/channel/UCTV_UOPu7EWXvYWsBFxMsSA/videos\n//\n\n// makes code 
```\n// Live coding problems, watch at\n// https://www.twitch.tv/yipcubed\n// https://www.youtube.com/channel/UCTV_UOPu7EWXvYWsBFxMsSA/videos\n//\n\n// makes code faster, but larger. Just for LeetCode fun!\n#pragma GCC optimise ("Ofast")\n\n// makes stdin not synced so it is faster. Just for LeetCode fun!\nstatic auto __ __attribute__((unused)) = []() {              // NOLINT\n    ios_base::sync_with_stdio(false);\n    cin.tie(nullptr);\n    return nullptr;\n}();\n\nclass MyHashSet {\npublic:\n    vector<bool> v;\n    /** Initialize your data structure here. */\n    MyHashSet() {\n        v.resize(1024);\n    }\n\n    void add(int key) {\n        while (key > v.size())\n            v.resize(v.size() * 2);\n        v[key] = true;\n    }\n\n    void remove(int key) {\n        if (key < v.size())\n        v[key] = false;\n    }\n\n    /** Returns true if this set contains the specified element */\n    bool contains(int key) {\n        return key < v.size() && v[key];\n\n    }\n};\n```
[]