UVA 12626 - I ❤ Pizza

Problem PDF

Solution:

#include

using namespace std;

int main()
{
    string nm;
    int cnt[10],tst,min;
    cin>>tst;
    getchar();
    while(tst--)
    {
        min=100000;
        memset(cnt,0,sizeof(cnt));
        getline(cin,nm);
        int len=nm.size();
        for(int k=0;kcnt[m]) min=cnt[m];
        }
        cout<
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12626/12626.cpp