simple C++ 100%/100%
\nclass Solution {\npublic:\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) {\n        \n        unordered_map<int, vector<int>*> m;\n    
```\nclass Solution {\npublic:\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) {\n        \n        unordered_map<int, vector<int>*> m;\n        \n        for(auto& p : pieces) {\n            m[p[0]] = &p;\n        }\n        \n        for(int i = 0; i < arr.size();) {\n\n            auto p = m[arr[i]];\n\n            if(!p || !equal(p->begin(), p->end(), arr.begin() + i)) return false;\n\n            i += p->size();\n        }\n        return true;\n    }\n};\n```
[]