Cheating
시간 제한1초메모리 제한1024 MB
네 글자 암호를 추측할 때마다 돌아오는 정보만으로 50번 안에 암호를 알아낸다.
문제
The Northwestern Europe Regional Contest is coming up soon, and you do not feel confident about your programming skills. In an act of desperation you decide to put on your black hat. After doing some reconnaissance on the contest website you stumble upon a hidden page, guarded by a password prompt in a system known as the Incredibly Clever Password Control (ICPC). Perhaps this is where the jury stores the solutions to all the contest problems?
After inspecting the system you make the following observations about ICPC:
-
It has a very strict password policy, requiring the password to consist of exactly four lowercase letters.
-
It allows at most incorrect login attempts before users are blocked from the system.
-
After every incorrect login attempt, ICPC reports back two numbers about the password that was entered:
- the number of positions that were correct, and
- the number of letters that were correct but in an incorrect position.
Use this information to log into the system.