I am getting TLE in PRFXGD .

#include<bits/stdc++.h>

using namespace std;

#define gcd(a,b) __gcd(a,b)

#define pb push_back

#define sevensins ios_base::sync_with_stdio(false);cin.tie(NULL);

#define ll long long int

#define mod 1000000007

#define vect vector

#define bins binary_search

#define vecti vector::iterator

#define bitout __builtin_popcount

#define binsrch binary_search

int main()

{sevensins

ll t,i,j,k,l,n,x;

cin>>t;

while(t–)

{

string s;

cin>>s;

```
cin>>k>>x;
ll count=0;
multiset<char> m;
set<char> c;
if(k==0)
{
for(i=0;i<s.size();i++)
{
m.insert(s[i]);
if(m.count(s[i])<=x)
{
count++;
}
else
break;
}
cout<<count<<"\n";
}
```

}

return 0;

}

This code is only for subtask-1.

can any one help please.