1519_SPAM

2022-5-16 18:17| 发布者: Hocassian| 查看: 52| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-2-89503879183500-Problem List-采集的数据-后羿采集器.html

Pro.ID

1519

Title

SPAM

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=1519

AC

4

Submit

6

Ratio

66.67%

时间&空间限制

  • Time Limit: 20000/10000 MS (Java/Others)     Memory Limit: 32768/32768 K (Java/Others)
  • 描述

    You never had any friends, and don't really want any anyways, and so you have decided to collect email addresses from web pages for direct e-mail advertising.

    The text delivered to a web browser is usually marked up HTML, which may contain email addresses of the form:

    user@server

    ¨ Bothuserandserverare of the formalpha.numeric.with.dots. Byalpha.numeric.with.dots, we mean a sequence of one or more characters which are alphabetic ( A-Z, a-z ), numeric ( 0-9 ), hyphens (-), underbars (_) and/or periods (.), with the following restrictions on periods:

    n The sequence neither starts nor ends with a period.

    n No periods are adjacent.

    ¨ Email addresses are preceded by the beginning of the file, or some character other than a letter ( A-Z, a-z ), digit ( 0-9), hyphen (-), or underbar (_).

    ¨ Email addresses are succeeded by the end of the file, or some character other than a letter ( A-Z, a-z ), digit ( 0-9 ), hyphen (-), or underbar (_).

    ¨ If the scanned text contains a sequence of the form

    first@second@third

    Then the output should containfirst@secondandsecond@thirdas email addresses. In a longer run, each pair split by an @-sign should appear as an email address in the output.

    The point of this problem is to extract and record the email addresses embedded in other text.

    输入

    The input file will contain zero or more lines of ASCII text.

    输出

    Description

    You never had any friends, and don't really want any anyways, and so you have decided to collect email addresses from web pages for direct e-mail advertising.

    The text delivered to a web browser is usually marked up HTML, which may contain email addresses of the form:

    user@server

    ¨ Bothuserandserverare of the formalpha.numeric.with.dots. Byalpha.numeric.with.dots, we mean a sequence of one or more characters which are alphabetic ( A-Z, a-z ), numeric ( 0-9 ), hyphens (-), underbars (_) and/or periods (.), with the following restrictions on periods:

    n The sequence neither starts nor ends with a period.

    n No periods are adjacent.

    ¨ Email addresses are preceded by the beginning of the file, or some character other than a letter ( A-Z, a-z ), digit ( 0-9), hyphen (-), or underbar (_).

    ¨ Email addresses are succeeded by the end of the file, or some character other than a letter ( A-Z, a-z ), digit ( 0-9 ), hyphen (-), or underbar (_).

    ¨ If the scanned text contains a sequence of the form

    first@second@third

    Then the output should containfirst@secondandsecond@thirdas email addresses. In a longer run, each pair split by an @-sign should appear as an email address in the output.

    The point of this problem is to extract and record the email addresses embedded in other text.

    Input

    The input file will contain zero or more lines of ASCII text.

    Output

    Other than the standard leader and trailer, the output file has each email address found in the input file in the order it was found (duplicates not removed).

    Sample Input
    bob@banks.com wrote:
    What does x=7 mean for this problem?  For
    example,

    ..a@a@aa@aaa@aaa..a@a@aa@aaa@aaa..a@a..@a...a@..@..

    this scrolling @-example from jim@jones.com
    Sample Output
    bob@banks.com
    a@a
    a@aa
    aa@aaa
    aaa@aaa
    a@a
    a@aa
    aa@aaa
    aaa@aaa
    a@a
    jim@jones.com

    样例输入

    bob@banks.com wrote:
    What does x=7 mean for this problem?  For
    example,

    ..a@a@aa@aaa@aaa..a@a@aa@aaa@aaa..a@a..@a...a@..@..

    this scrolling @-example from jim@jones.com

    样例输出

    bob@banks.com
    a@a
    a@aa
    aa@aaa
    aaa@aaa
    a@a
    a@aa
    aa@aaa
    aaa@aaa
    a@a
    jim@jones.com

    提示

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部