当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3550:AT – sequence

题目描述

AT-sequences are command strings used to control modems. An AT-sequence is a string of no more than 500 characters consisting of the prefix 'AT' followed by some commands immediately one after another without any separators. Here is a simplified description of the modem commands.

Each command consists of a header and an optional numeric value (non-negative integer containing no more than 4 digits). If there is a value in the command, it is separated from the header by the character '='.

The header itself also consists of two parts. The first, mandatory, part of a header has one of the following forms:

  • one or two upper-case Latin letters;
  • one of the symbols '&', '#', '@', followed by one upper-case Latin letter.

The second, optional part of a header is a non-negative integer containing no more than 20 digits.

Spaces are not allowed in the command notation. If the command notation contains only one or two Latin letters, this command can't precede another one with the notation started by a letter.

The task is to determine all commands included in the structure of a correct AT-sequence.

输入解释

The input contains one line with the source AT-sequence.

输出解释

Each line of the output contains one command from the AT-sequence given in the input file. The commands must be listed in the same order as in the AT-sequence. If AT-sequence have no commands you must generate nothing.

输入样例
ATDP2934564&H0S0=4
输出样例
DP2934564
&H0
S0=4

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3550

最后修改于 2020-10-29T07:04:20+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536