✅C++ || Accepted Easy Solution || Sorting⛳
Code

# Code
```cpp []
class Solution {
public:
    static bool cmp(vector<string>& a,vector<string>& b){
        if(stoi(a[1]) == stoi(b[1])){
            if(a[0]=="OFFLINE") return 1;
            else return 0;
        }else return stoi(a[1]) < stoi(b[1]);
    }
    
    vector<int> countMentions(int n, vector<vector<string>>& events) {
        vector<int> res(n,0);
        map<int,int> mp;
        sort(events.begin(),events.end(),cmp);
        for(int i=0;i<events.size();i++){
            if(events[i][0]=="OFFLINE"){
                mp[stoi(events[i][2])] = stoi(events[i][1])+60;
            }else{
                if(events[i][2] == "ALL"){
                    for(int j=0;j<n;j++) res[j] += 1;
                }else if(events[i][2] == "HERE"){
                    
                    for(int j=0;j<n;j++){
                        if(mp.count(j)==0 || mp[j] <= stoi(events[i][1])){
                            res[j] += 1;
                        }
                    }
                }else{
                    
                    string ids = events[i][2];
                    ids += ' ';
                    string temp = "";
                    for(int j=0;j<ids.size();j++){
                        if(ids[j] == ' '){
                            string id = temp.substr(2);
                            temp = "";
                            int id_ = stoi(id);
                            res[id_]++;
                        }else temp += ids[j];
                    }                   
                }
            }
        }
        return res;
    }
};
```
['C++']