Easy C++ Solution || 100% Faster || O(N) ✅✅
\nclass Solution {\npublic:\n    int minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int cnt
```\nclass Solution {\npublic:\n    int minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {\n        int cnt = 0;\n        for(int i = 0; i < energy.size(); i++){\n            if(initialEnergy > energy[i] && initialExperience > experience[i]){\n                initialEnergy -= energy[i];\n                initialExperience += experience[i];\n            }\n            else if(initialEnergy <= energy[i] && initialExperience <= experience[i]){\n                cnt += energy[i] + 1 - initialEnergy;\n                cnt += experience[i] + 1 - initialExperience;\n                initialEnergy = 1;\n                initialExperience = 2*experience[i] + 1;\n            }\n            else if(initialEnergy <= energy[i] && initialExperience > experience[i]){\n                cnt += energy[i] + 1 - initialEnergy;\n                initialEnergy = 1;\n                initialExperience += experience[i];\n            }\n            else if(initialEnergy > energy[i] && initialExperience <= experience[i]){\n                cnt += experience[i] + 1 - initialExperience;\n                initialEnergy -= energy[i];\n                initialExperience = 2*experience[i] + 1;\n            }\n        }\n        return cnt;\n    }\n};\n```
['C', 'C++']