RG11_2 - CLAVES SEGURAS GRADO 11
A secure password is a tricky thing. Users prefer passwords that are easy to remember (like "friend"), but this password can be insecure. Some sites use a random password generator (like "xvtpzyo"), but users spend too much time remembering them and sometimes write them down on a sticky note.
One potential solution is to generate “pronounceable” passwords that are relatively secure but easy to remember.
FnordCom is developing a password generator. Your job in the QA department is to test the generator and ensure the passwords are acceptable.
To be acceptable, the password must satisfy these three rules:
- Must contain at least one vowel.
- It must not have three consecutive vowels or three consecutive consonants.
- There must not be two consecutive occurrences of the same letter, except for 'ee' or 'oo'.
(For the purpose of this problem, the vowels are 'a', 'e', 'i', 'o', and 'u'; all other letters are consonants.)
Note that these rules are not perfect; there will be many common/pronounceable words that are not acceptable.
Input
The input consists of one or more potential passwords, one per line, followed by a line containing the word 'end' that signals the end of the input. Each password is at least one and at most twenty letters long and consists only of lowercase letters.
Output
For each password, display whether or not it is acceptable, using the format shown in the example.Example
Input: a tv ptoui bontres zoggax wiinq eep houctuh end Output: <a> is acceptable. <tv> is not acceptable. <ptoui> is not acceptable. <bontres> is not acceptable. <zoggax> is not acceptable. <wiinq> is not acceptable. <eep> is acceptable. <houctuh> is acceptable.
Added by: | MaratónAFDM |
Date: | 2018-07-31 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C NCSHARP CSHARP C++ 4.3.2 JAVA JULIA PYTHON PYPY3 PYTHON3 |