A11238. Tests Renumeration
编程题
普及/提高-
知识点
题目描述
The first line contains single integer $n$ ( $1<=n<=10^{5}$ ) — the number of files with tests.
$n$ lines follow, each describing a file with test. Each line has a form of "name\_i type\_i", where "name\_i" is the filename, and "type\_i" equals "1", if the $i$ -th file contains an example test, and "0" if it contains a regular test. Filenames of each file are strings of digits and small English letters with length from $1$ to $6$ characters. The filenames are guaranteed to be distinct.
$n$ lines follow, each describing a file with test. Each line has a form of "name\_i type\_i", where "name\_i" is the filename, and "type\_i" equals "1", if the $i$ -th file contains an example test, and "0" if it contains a regular test. Filenames of each file are strings of digits and small English letters with length from $1$ to $6$ characters. The filenames are guaranteed to be distinct.
输入格式
In the first line print the minimum number of lines in Vladimir's script file.
After that print the script file, each line should be "move file\_1 file\_2", where "file\_1" is an existing at the moment of this line being run filename, and "file\_2" — is a string of digits and small English letters with length from $1$ to $6$ .
After that print the script file, each line should be "move file\_1 file\_2", where "file\_1" is an existing at the moment of this line being run filename, and "file\_2" — is a string of digits and small English letters with length from $1$ to $6$ .
输出格式
无
输入输出样例
输入 #1
5 01 0 2 1 2extra 0 3 1 99 0
输出 #1
4 move 3 1 move 01 5 move 2extra 4 move 99 3
输入 #2
2 1 0 2 1
输出 #2
3 move 1 3 move 2 1 move 3 2
输入 #3
5 1 0 11 1 111 0 1111 1 11111 0
输出 #3
5 move 1 5 move 11 1 move 1111 2 move 111 4 move 11111 3