#include
#include
#include
using namespace std;
void maxNumTimes(int a[], int len, int b[])
{
map mapData;
int count = 0;
for(int i = 0; i < len; i++)
{
mapData[a[i]]++;
}
//int max times
int maxTimes = 0;
map::const_iterator it = mapData.begin();
while(it!= mapData.end())
{
if(maxTimes < it->second)
maxTimes = it->second;
it++;
}
//int max num
int maxNum = 0;
map::reverse_iterator re_it = mapData.rbegin();
while(re_it != mapData.rend())
{
if (maxTimes == re_it->second)
{
if (maxNum < re_it->first)
{
b[0] = re_it->first;
}
b[1] = re_it->second;
}
re_it++;
}
}