HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


0th-3. 50763 - Valid Password

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (4)

Contest problems

• 0th-1. 50402 - Hello World!
• 0th-2. 50403 - Number of Chairs
• 0th-3. 50763 - Valid Password
• 0th-4. 50404 - Sum of Self Powers
• 0th-5. 50692 - How much money?
• 1st-2. 50483 - Group Total
• 1st-3. 50484 - Number Of Letters
• 1st-4. 50473 - Counting Circles Posit...
• 1st-6. 50485 - Center of gravity of ...
• 2nd-1. 50522 - Multiplication Table - 2
• 2nd-2. 50512 - Coding redundancy

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by : Ibrahim Mesecan.

Valid Password

Question:
You are managing the school information system. The school administration wants to enforce people to have certain security level for their passwords. And thus, they want all passwords:

  • to be at least 4 chars long or at most 12 chars long
  • to include,
    • at least one lowercase letter from English alphabet
    • at least one uppercase letter from English alphabet
    • at least one digit: 0, 1, 2, ..9
    • at least one special character from the following: ! " # $ % & ' ( ) * + , - .
and they don't want passwords to include any other characters.

Input specification
You will be given a string in a line. The string may contain any ASCII char (chars from ASCII table between 32 and 255).

Output specification
Show the message "OK", if the given password complies all condition. Otherwise, show the message "NO".

 Sample Input I     Sample Output I   
(3p0Ka-C3n)
 OK


Для отправки решений необходимо выполнить вход.

www.contester.ru