subject

You are given two strings pattern and s. The first string pattern contains only the symbols 0 and 1, and the second string s contains only lowercase English letters. Let's say that pattern matches a substring s[l..r] of s if the following 3 conditions are met: they have equal length; for each 0 in pattern the corresponding letter in the substring is a vowel; for each 1 in pattern the corresponding letter is a consonant. Your task is to calculate the number of substrings of s that match pattern. Note: In this task we define the vowels as 'a' 'e', 'i', 'o', 'u', and 'y'. All other letters are consonants.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
To remove a header or footer from a document you can open the header and footer and manually delete the content true or false
Answers: 1
question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 22.06.2019 11:30
Communication is the exchange of information. true false
Answers: 2
question
Computers and Technology, 23.06.2019 01:30
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
You know the right answer?
You are given two strings pattern and s. The first string pattern contains only the symbols 0 and 1,...
Questions
question
Mathematics, 27.01.2020 17:31
Questions on the website: 13722367