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

建议使用的浏览器:

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

3424:Better security

题目描述

Young black-hat hacker Vasya routinely installs key loggers on every computer he can get his hands on. Browsing the logs collected, he sometimes can glance passwords of unaware users.

The IT department of the university where Vasya studies noticed suspicious activity and introduced a new, more secure way to enter passwords. Instead of password input field, window with 9 buttons is displayed. Buttons are arranged into 3 × 3 grid as shown in the table below.

789
456
123

Each button is a square of 100 by 100 pixels. There is no space between buttons. User must enter (digital) password by clicking buttons with a mouse.

To overcome this scheme, Vasya downloaded another cool program: mouse logger. It saves coordinates of clicks in a file, which Vasya is later able to browse. However, a complication has arisen: no information is saved about the position of password window on the screen. Indeed, it might even be partially off screen!

Your program must, given the series of mouse clicks, determine all possible corresponding passwords.

输入解释

Input file contains number of clicks N followed by integer coordinates x1 y1 x2 y2xN yN.

Constraints

1 ≤ N ≤ 100, 0 ≤ xi yi ≤ 1000

输出解释

Output file must contain one line per possible password. Each line must consist of exactly N digits. Lines must be sorted in lexicographical order. If there are no possible combinations, output file must contain the string NONE.

输入样例
Sample Input 1
2
10 12 110 12
Sample Input 2
2
10 12 750 12
输出样例
Sample Output 1
12
23
45
56
78
89
Sample Output 2
NONE
提示
Bold texts appearing in the sample sections are informative and do not form part of the actual data.

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

源链接: POJ-3424

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

共提交 0

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