TESTPASS - Password01

no tags 

Create a program that verifies passwords. Requirements:

  • 6-20 characters.
  • at least one capital letter, one small, one special character, one digit.
  • the password can not contain consecutive strings of 2 and 3 characters.

Input

Number of passwords.

Passwords.

Output

Check result "YES" if correct "NO" if not.

Example

Input:
8
PASS
P@ss
P@ss123123
Alabama@#1
nonoP@ssw0rd
My2P@SSword
abcddcba123#
MyP@sswordIsReallyLong@RosesAreBlue

Output:
NO
NO
NO
YES
NO
YES
NO
NO

hide comments
Simes: 2023-02-11 20:34:35

No submit button

d3ath: 2019-05-30 07:48:10

What does the 3rd requirement means. Does it mean that we can't have same substring repeated twice?

samy1111: 2019-05-29 09:43:09

In example 7th line abcddcba123# is marked as YES but doesn't contain capital letter which is require.

tumatij: 2017-12-06 17:04:26

@Admin can you elaborate this "the password can not contain consecutive strings of 2 and 3 characters."


Added by:yinglong
Date:2017-02-01
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU
Resource:none