Next: Sample Input
Up: Spamming
Previous: Input
Output all the email addresses, one per line, that appears in the text,
by the order of their appearances. Assume email addresses are in this
format:
- Each address is on a single line only. A line can contain
several addresses.
- Each address consists of two parts, the user name, and the domain
name. They are separated by @. Names have at least one
characters.
- Valid characters are the alphabets (A to Z, lower or upper cases)
numbers (0 to 9) and underscores _.
- Periods (.) can be used in both user name and the domain
name. For example, John.Doe@dummy.com is a valid address. A
period must be surrounded by two words, so john.doe.@dummy,
john..doe@dummy, etc. are not valid email addresses.
Once a part of a line is determined to be an email address, that part
of the line would not be considered again. Scanning starts at the
beginning of the line. For example, for the line:
after a@b is determined to be an email address, only the part
@c@d@e would be considered subsequently. So the valid email
addresses on this line are a@b and c@d only.
ACM Programming Contest Account
Mon Feb 5 17:30:22 EST 2001