#K40517. Secure Password Checker
Secure Password Checker
Secure Password Checker
You are given an integer T followed by T passwords. A password is considered secure if and only if it satisfies all of the following conditions:
- The length of the password is between 8 and 20 characters, i.e. \(8 \leq |\text{password}| \leq 20\).
- It contains at least one lowercase letter.
- It contains at least one uppercase letter.
- It contains at least one digit.
- It contains at least one special character from the set: ! @ # $ % ^ & * ( ) - +.
For each password, print "YES" if the password is secure; otherwise, print "NO".
inputFormat
The input is given via standard input and consists of:
- An integer T representing the number of passwords.
- T lines each containing a password string.
outputFormat
For each password, output on a separate line either "YES" if it is secure or "NO" if it is not.
## sample4
Password123!
short1!
NoSpecialChar123
Valid$Password1
YES
NO
NO
YES
</p>