Computer Science, asked by sachinkv5312, 20 days ago

You are given a string S of size N. You create K copies of string S. Now, you have a total of K+1 strings S, You are allowed to do at most one swap in each string. In one swap you can swap characters at any two Your task is to find the maximum number of distinct strings that can be obtained from the K+1 strings if yo Note: • You are not allowed to swap characters between two different strings. Input Format The first line contains an integer, N, denoting the size of string S.the next line contains an integer, k, denoting the number of copies of S. The next line contains a string, S, denoting the string S

Answers

Answered by sushilmehto991
0

Answer:

this is answer is correct

Attachments:
Similar questions