A10722 | Comments
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
The first line contains non-empty comments feed in the described format. It consists of uppercase and lowercase letters of English alphabet, digits and commas.
It is guaranteed that each comment is a non-empty string consisting of uppercase and lowercase English characters. Each of the number of comments is integer (consisting of at least one digit), and either equals $0$ or does not contain leading zeros.
The length of the whole string does not exceed $10^{6}$ . It is guaranteed that given structure of comments is valid.
It is guaranteed that each comment is a non-empty string consisting of uppercase and lowercase English characters. Each of the number of comments is integer (consisting of at least one digit), and either equals $0$ or does not contain leading zeros.
The length of the whole string does not exceed $10^{6}$ . It is guaranteed that given structure of comments is valid.
输入格式
Print comments in a format that is given in the statement. For each level of nesting, comments should be printed in the order they are given in the input.
输出格式
The first example is explained in the statements.
输入输出样例
输入 #1
hello,2,ok,0,bye,0,test,0,one,1,two,2,a,0,b,0
输出 #1
3 hello test one ok bye two a b
输入 #2
a,5,A,0,a,0,A,0,a,0,A,0
输出 #2
2 a A a A a A
输入 #3
A,3,B,2,C,0,D,1,E,0,F,1,G,0,H,1,I,1,J,0,K,1,L,0,M,2,N,0,O,1,P,0
输出 #3
4 A K M B F H L N O C D G I P E J
The first example is explained in the statements.
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted