Easy to understand C++ solution
Code

# Code
```cpp []
class Solution {
public:
    static bool cmp(vector<string> a, vector<string> b) {
        int timeA = stoi(a[1]);
        int timeB = stoi(b[1]);
        if (timeA != timeB) {
            return timeA < timeB;
        }
        // "OFFLINE" events come before "MESSAGE" events if timestamps are equal
        return a[0] == "OFFLINE" && b[0]!="OFFLINE";
    }

    vector<int> countMentions(int numberOfUsers, vector<vector<string>>& events) {
        vector<int> mention(numberOfUsers, 0);
        vector<int> offline(numberOfUsers, 0);
        sort(events.begin(), events.end(), cmp);

        for(auto it: events) {
            string type = it[0];
            if(type == "MESSAGE") {
                string str = it[2];
                int tt = stoi(it[1]);
                if(str == "HERE") {
                    for(int i=0; i<mention.size(); i++) {
                        if(offline[i] == 0 || offline[i]+60 <= tt) {
                            mention[i]++;
                        }
                    }
                }
                else if(str == "ALL") {
                    for(int i=0; i<mention.size(); i++) {
                        mention[i]++;
                    }
                }
                else {
                    stringstream ss(str);
                    string token;

                    while(ss >> token) {
                        int num = stoi(token.substr(2));
                        mention[num]++;
                    }
                }
            }

            if(type == "OFFLINE") {
                string str = it[2];
                int num = stoi(str);

                offline[num] = stoi(it[1]);
            }
        }

        return mention;
    }
};
```
['Sorting', 'C++']