3614.Yaroslav and Algorithm

Time Limit: 1s Memory Limit: 256MB

Yaroslav likes algorithms. We'll describe one of his favorite algorithms.
The algorithm receives a string as the input. We denote this input string as a. The algorithm consists of some number of command. Command number i looks either as si \gt \gt wi, or as si \neq wi, where si and wi are some possibly empty strings of length at most 7, consisting of digits and characters "?". At each iteration, the algorithm looks for a command with the minimum index i, such that si occurs in a as a substring. If this command is not found the algorithm terminates. Let's denote the number of the found command as k. In string a the first occurrence of the string sk is replaced by string wk. If the found command at that had form sk \gt \gt wk, then the algorithm continues its execution and proceeds to the next iteration. Otherwise, the algorithm terminates. The value of string a after algorithm termination is considered to be the output of the algorithm.
Yaroslav has a set of n positive integers, he needs to come up with his favorite algorithm that will increase each of the given numbers by one. More formally, if we consider each number as a string representing the decimal representation of the number, then being run on each of these strings separately, the algorithm should receive the output string that is a recording of the corresponding number increased by one.

Help Yaroslav.

Input Format(From the terminal/stdin)

The first line contains integer n (1 \le n \le 100) - the number of elements in the set. The next n lines contains one positive integer each. All the given numbers are less than 1025.

Output Format(To the terminal/stdout)

Print the algorithm which can individually increase each number of the set. In the i-th line print the command number i without spaces.

Your algorithm will be launched for each of these numbers. The answer will be considered correct if:
Each line will a correct algorithm command (see the description in the problem statement). The number of commands should not exceed 50. The algorithm will increase each of the given numbers by one. To get a respond, the algorithm will perform no more than 200 iterations for each number.

Sample Input

Copy
2
10
79
 \n
  \n
  \n

Sample Output

Copy
10 \neq 11
79 \neq 80
  ·    ·  \n
  ·    ·  \n

Submit

请先 登录

© 2025 FAQs