Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Sir, Solve this problem in assembly language using emu 8086 with explanation . It would be better to give a screenshot of output. Please

Please Sir, Solve this problem in assembly language using emu 8086 with explanation. It would be better to give a screenshot of output. Please ,Do not use any other languages except assembly. Calculate the minimum number of characters you need to change in the string s, so that it contains at least k different letters, or print that it is impossible.

String s consists only of lowercase Latin letters, and it is allowed to change characters only to lowercase Latin letters too.

Input First line of input contains string s, consisting only of lowercase Latin letters (1|s|1000, |s| denotes the length of s).

Second line of input contains integer k (1k26).

Output Print single line with a minimum number of necessary changes, or the word impossible (without quotes) if it is impossible.

Examples input yandex 6 output 0 input yahoo 5 output 1 input google 7 output impossible

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

What is the purpose of having an organized sales process?

Answered: 1 week ago