c++ O(N) 12 ms with fast I/O
\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {        \n        unordered_set<string> s;\n        char                  str[101]
```\nclass Solution {\npublic:\n    int numUniqueEmails(vector<string>& emails) {        \n        unordered_set<string> s;\n        char                  str[101];\n        \n        for (int i = 0; i < emails.size(); ++i) {\n            const char*  src = emails[i].c_str();\n            const char*  end = src + emails[i].length();\n            char*        dst = str;\n            \n            // Process local\n            while (*src != \'+\' && *src != \'@\') {\n                if (*src != \'.\') *dst = *src, ++dst;\n                ++src;\n            }\n            \n            while (*src != \'@\') ++src;\n            \n            // Process domain\n            memcpy(dst, src, end - src + 1);\n            \n            // Update hash table\n            s.emplace(str);\n        }\n        \n        return s.size();\n    }\n};\n\n// Fast I/O\nstatic bool     _foo = ios::sync_with_stdio(false);\nstatic ostream* _bar = cin.tie(NULL);\n```
[]