First post!
Intuitionit just be like thatApproachi just did itComplexity
Time complexity:
pretty quick
Space complexity:
not very smallCode
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
it just be like that
# Approach
<!-- Describe your approach to solving the problem. -->
i just did it
# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
pretty quick
- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
not very small

# Code
```cpp []
class Solution {
public:
    int minNumberOfHours(int initialEnergy, int initialExperience, vector<int>& energy, vector<int>& experience) {
    int minener = 0;
    for (auto x: energy) {
        minener+= x;
    }
    if (minener >= initialEnergy){
        minener -= initialEnergy;
        minener ++;
    } else {
        minener = 0;
    }


    experience.insert(experience.begin(),initialExperience);
    experience.insert(experience.begin(),0);


    int total = experience[0] + experience[1];
    int need = 0;
    for (int i=2; i<experience.size();i++){
        if (total > experience[i]){
            total += experience[i];
        } else if (total <= experience[i]){
            need += (experience[i]+1 - total);
            total += (experience[i] + 1 - total) + experience[i];
        }
    }
    return minener+need;





    }
};
```
['C++']