Author: aarush jain
DIFFICULTY:
Easy
EXPLANATION:
for (int x=0;x<n;x++){
char ch = s[x], len=0;
vector<int> count(26,0);
In this code, the type of the variable len
is char
which can store a maximum value of 127. Beyond this, there will be an overflow error. Hence, any string with with an answer greater than 127 will fail.
cout << 128 << "\n";
for(int x=0;x<128;x++)
cout << 'a';
cout << "\n1\n";