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, 22.06.2019 17:30
Ou listened to a song on your computer. did you use hardware or software?
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
question
Computers and Technology, 23.06.2019 19:40
Use a physical stopwatch to record the length of time it takes to run the program. calculate the difference obtained by calls to the method system.currenttimemillis() just before the start of the algorithm and just after the end of the algorithm. calculate the difference obtained by calls to the method system.currenttimemillis() at the start of the program and at the end of the program so that the elapsed time includes the display of the result. use the value returned by the method system.currenttimemillis() just after the end of the algorithm as the elapsed time.
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
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