![]() | ||||
Online Judge | Problem Set | Authors | Online Contests | User |
---|---|---|---|---|
Web Board Home Page F.A.Qs Announcement | Current Contest Past Contests Scheduled Contests Award Contest |
Atom Bombs!? God!
Description ![]() Three atomic warheads are displayed there, where two of them are assigned to letter &L* and one of them to &O*. Visitors are only allowed to move back and forth on the guard line. At some point of the guard line, visitors may see some strange words formed by all the N letters. For instance, at the leftmost and rightmost part of the guard line, people may see a word ※LOL§ (words are obtained by letters from left to right). The positions that make some warheads blocked by others in line of sight should not be valid. You are given an expected word to be seen, along with the coordinates of atomic booms (x, y) where y > 0. The guard line is just the x-axis. You are to output the whole intervals of places on x-axis, where the expected word can be seen. The intervals (A1, B1), (A2, B2), ... (AM, BM) should be expressed as a sequence of 2 * M values, A1, B1, A2, B2, # AM, BM. A1 should be replaced by * if it is 每infinity, similarly BM should be replaced by * if it is infinity. What is more, we have restrictions that A1 < B1 <= A2 < B2 <=# <= AM < BM. (since we are always using open intervals, Bi may be equal with Ai+1) Input Output Sample Input Sample Output Source |
[Submit] [Go Back] [Status] [Discuss]
All Copyright Reserved 2003-2005 Ying Fuchen,Xu Pengcheng
Any problem, Please Contact Administrator