Logo
(追記) (追記ここまで)

9309번 - Password Validation 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB156543728.030%

문제

A company has asked you to write a password checker for their online system. When new users enter their passwords, your program must determine whether or not it is a good password. A good password meets all of the following requirements.

  • The password is between 9 and 20 characters in length inclusive (its length can be equal to 9 or 20)
  • The password contains at least 2 lowercase letters
  • The password contains at least 2 uppercase letters
  • The password contains at least 1 number
  • The password contains at least 2 non-alphanumeric characters (assume the only non-alphanumeric characters are : ! @ # \$ % ^ & * . , ; / ?
  • The password does not contain any 3 consecutive characters (case matters)
  • Disregarding all non-alphanumeric characters and case, the subsequence of alphanumeric characters is not a palindrome (for example: "&Ra^#r" still counts as a palindrome)
  • The password contains no subsequence of alphanumeric characters, disregarding case, either in forward or reverse order that is equal to any of the following words (for example: pKassWordL and KdRrowSmsap are both invalid passwords):
    • password
    • virginia
    • cavalier
    • code

입력

The first line of input will contain an integer N signifying the number of test cases. The following N lines will contain a string representing the password to be checked. The passwords will contain no spaces.

출력

For each test case, determine whether it meets the requirements for the passwords as stated above. If the test case is valid, print "Valid Password", if the test case is invalid, print "Invalid Password".

제한

예제 입력 1

3
SPring2011!!
pKassW&ordL*
123^45ABcde.

예제 출력 1

Valid Password
Invalid Password
Valid Password

힌트

출처

School > University of Virginia High School Programming Contest > UVa HSPC 2011 C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /