A11238 | Tests Renumeration
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
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
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted