Easy C++ solution
\nclass Solution \n{\npublic:\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) \n    {\n        // First I\'m storing the indexes of the ve
```\nclass Solution \n{\npublic:\n    bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) \n    {\n        // First I\'m storing the indexes of the vectors of pieces in a map with a key equals to the first value in that vector.\n        unordered_map<int,int>m;\n        for(int i=0;i<pieces.size();i++)\n        {\n            m[pieces[i][0]]=i;\n        }\n        int i=0;\n        while(i<arr.size())\n        {\n            //If any element of arr is absent in pieces then return false\n            if(m.find(arr[i])==m.end())\n            {\n                return false;\n            }\n            // Otherwise pick up that vector whose first element is arr[i]\n            // and compare all the elements of that selected vector with \n            // the elements of arr. If in the mean time any mismatch occurs\n            // simply return false.\n            else\n            {\n                int j=0;\n                vector<int>tmp=pieces[m[arr[i]]];\n                while(i<arr.size() && j<tmp.size())\n                {\n                    if(arr[i]!=tmp[j])\n                    {\n                        return false;\n                    }\n                    i++;\n                    j++;\n                }\n            }\n        }\n        return true;\n    }\n};\n```
['C']