2764. Clock Captcha

单点时限: 5.0 sec

内存限制: 256 MB

The digital display clock installed in problem dd is only one part of the solution to eliminate antedating documents. The second part is a camera which takes pictures of the office regularly and records at what times was each document signed and stamped. These records can later serve as an evidence.

Your task is to scan a picture take by the camera and decode numbers on the digital display.


The input will exactly follow Output Specification for Problem dd, with only one important

exception: Since image scanning is always an error-prone process, some of the characters representing the display may not be recognized correctly. Fortunately, we know which characters are incorrect, because a very sophisticated error-detecting mechanism is used. These characters are replaced by dots (“.”) in the input. Such spots can represent any of the allowed characters.

There will be two blank line between adjacent cases~~


Your output must follow Input Specification for Problem dd. For each display, output the time shown on it. You may assume that at least one such time exists.

However, due to the scanning errors, sometimes there may be several possible valid times that could be represented by the same picture. In such cases, we may not risk giving an incorrect information ― print the word “ambiguous” instead of the time.

5 人解决,6 人已尝试。

18 份提交通过,共有 35 份提交。

6.7 EMB 奖励。

创建: 10 年,10 月前.

修改: 3 年前.

最后提交: 9 年,6 月前.

来源: CTU Open Contest 2009