Another Contest 6 Problem 7 - Consonant or Vowel?

View as PDF

Submit solution

Points: 1 (partial)
Time limit: 1.0s
Memory limit: 1G

Problem type

You will be given a string of lowercase letters. Your job will be to identify, for each letter, whether it is a vowel or a consonant.

Input Specification

The input will consist of two lines.

The first line will contain a single positive integer N. You may assume N \le 10^6.

The second line will contain a string S of length N containing only lowercase letters.

Output Specification

Output a binary string of length N. Digit i should be 1 if and only if the ith letter is a consonant.


The input will consist of exactly one test case, where N is 10^6. The number of points you earn on this problem is equal to the number of characters that match between your output and the judge solution's output.

However, malformed outputs will earn a score of zero. This includes, but is not limited to, outputs that are not binary strings, multi-line outputs, and outputs of the incorrect length. As is standard for problems prepared by this person, make sure your output is properly newline-terminated.

Your answer must be internally consistent, and answers that are not will be rejected. Specifically, every instance of the same letter must map to the same digit in your output.

An output will receive an output of AC if and only if it passes all of the above checks. If your solution does not get AC, you should make sure it coheres with the above.

The input string is generated, not necessarily uniformly at random, from the set of all length-N lowercase alphabet strings that contain at least one instance of each of the 26 lowercase letters. Submissions will therefore not be rejudged for the purposes of mutating the score of partially correct submissions.

Sample Input


Sample Output


Sample Explanation

z is a consonant and o is a vowel.


There are no comments at the moment.