#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int frequency[8] = {1,2,3,10,5,6,7,-8};
int* p = max_element(frequency, frequency+8);
cout << "The largest number is " << *p
<< " and it is in frequency[" << (p - frequency) << "]\n";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpCnsKICAgIGludCBmcmVxdWVuY3lbOF0gPSB7MSwyLDMsMTAsNSw2LDcsLTh9OwogICAgaW50KiBwID0gbWF4X2VsZW1lbnQoZnJlcXVlbmN5LCBmcmVxdWVuY3krOCk7CiAgICBjb3V0IDw8ICJUaGUgbGFyZ2VzdCBudW1iZXIgaXMgIiA8PCAqcAogICAgICAgICA8PCAiIGFuZCBpdCBpcyBpbiBmcmVxdWVuY3lbIiA8PCAocCAtIGZyZXF1ZW5jeSkgPDwgIl1cbiI7Cn0gICAgICAgIAo=