#P15334. [GCPC 2025] Generating Cool Passwords Company

    ID: 15340 远端评测题 1000ms 2048MiB 尝试: 0 已通过: 0 难度: 3 上传者: 标签>字符串2025Special Judge构造ICPC

[GCPC 2025] Generating Cool Passwords Company

Description

You have been tasked with creating a list of very secure passwords to be distributed to the users at the Generating Cool Passwords Company. Therefore, given an integer nn, generate exactly nn passwords which each satisfy the following criteria:

  • Each password consists of at least 8 and at most 12 printable ASCII characters with code between 33 (!) and 126 (~) inclusive. See Figure G.1 for an overview of these.
  • Each password contains at least one lowercase letter a-z, at least one uppercase letter A-Z, at least one digit 0-9 and at least one special symbol (any character that is neither a digit nor a lowercase or uppercase letter).

:::align{center}

Figure G.1: All the non-whitespace printable ASCII characters. The four relevant character classes are highlighted in different colours. :::

Of course, the passwords should not be too similar to each other. Specifically, for every pair of passwords from your list it must be true that they are distinct and that moreover it is not possible to get one from the other by inserting, modifying or deleting a single character. Formally, the edit distance of any two passwords must be at least 2.

Input Format

The input consists of:

  • One line with an integer nn (1n10001 \leq n \leq 1000), the number of passwords to create.

Output Format

Output nn lines, each with one password according to the rules above. The passwords must have pairwise edit distance at least 2. If there is more than one solution, any one of them will be accepted.

3
haXXor@1337
hunTer2!!!
abcABC123#@$