For this Question: You are given a string S of length N. Find the character which occurs the most number of times in this string. If there are mutliple such characters present, print -1.The first line of the input contains a single integer N.
The second line of the input contains a string S.

<b>Constraints:</b>
2 <b>&le;</b> N <b>&le;</b> 10<sup>5</sup>
All characters in string S are lowercase english letters.Print the character which occurs the most number of times in this string. If there are mutliple such characters present, print -1.Sample Input:
7
abadcar

Sample Output:
a, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
    int n;
    cin >> n;
    string s;
    cin >> s;
    map<char, int> mp;
    for(auto i : s) mp[i]++;
    int mx = 0, f = 0;
    char ch;
    for(auto i : mp){
        if(i.second > mx){
            mx = i.second;
            f = 1;
            ch = i.first;
        }
        else if(i.second == mx){
            f++;
        }
    }
    if(f == 1){
        cout << ch;
    }
    else cout << -1;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?