UVA 11577 - Letter Frequency

Problem PDF

Solution:

/*-----------------------------------------------*/
//Problem Setter: Sumudu Fernando
//Problem Name  : Letter Frequency
//Uva Problem No: 11577
//Type          : Ad hoc.
//Author        : Shipu Ahamed
//University    : BUBT
//E-mail        : shipuahamed01@gmail.com
/*-----------------------------------------------*/

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define ll long long
#define sc scanf
#define pf printf
#define pi 2*acos(0.0)
using namespace std;
int main()
{
    string s,p;
    int t;
    cin>>t;
    getchar();
    while(t--)
    {
        getline(cin,s);

         int l=s.size();
         mapmp;
         mapmp1;
         priority_queuepq;

         for(int i=0;i='A'&&s[i]<='Z')
             {
                 s[i]=s[i]+32;
             }
             mp[s[i]]++;
         }
         for(int i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11577/11577.cpp