CF12A.Super Agent
入门
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agent Pearlo for many years. When, finally, Pearlo learned all secrets of espionage, he penetrated into the Potatoland territory and reached the secret base.
Now he is standing at the entrance, but to get inside he need to pass combination lock. Minute ago one of the workers entered the password on the terminal and opened the door. The terminal is a square digital keyboard 3 × 3 with digits from 1 to 9.
Pearlo knows that the password consists from distinct digits and is probably symmetric with respect to the central button of the terminal. He has heat sensor which allowed him to detect the digits which the worker pressed. Now he wants to check whether the password entered by the worker is symmetric with respect to the central button of the terminal. This fact can Help Pearlo to reduce the number of different possible password combinations.
在土豆国(Potatoland)有一座极其隐秘的基地,那里按照一种特殊配方制作土豆泥。来自粥国(Porridgia)的邻居们决定窃取该配方,并将其出售给米饭国(Pilauland)。为此,他们多年来一直在秘密培养特工梨洛(Pearlo)。终于,梨洛掌握了全部间谍技能,成功潜入土豆国境内并抵达了这座秘密基地。
此刻,他正站在基地入口处,但要进入内部,必须解开一道密码锁。就在一分钟前,一名工人在终端上输入了密码,打开了大门。该终端是一个 3×3 的方形数字键盘,上面标有数字 1 至 9,如下图所示:

梨洛知道,密码由互不相同的数字组成,且很可能关于终端中心按键呈中心对称。他携带了一个热感应器,可探测出工人按下了哪些数字。现在,他想验证:工人输入的密码是否关于终端中心按键呈中心对称。这一信息将帮助梨洛大幅缩小可能的密码组合数量。
输入格式
Input contains the matrix of three rows of three symbols each. Symbol «X» means that the corresponding button was pressed, and «.» means that is was not pressed. The matrix may contain no «X», also it may contain no «.».
输入包含一个由三行三列符号组成的矩阵。符号 «X» 表示对应的按钮被按下,而 «.» 表示对应的按钮未被按下。该矩阵中可能不包含任何 «X»,也可能不包含任何 «.»。
输出格式
Print YES if the password is symmetric with respect to the central button of the terminal and NO otherwise.
如果密码关于终端的中心按钮对称,则输出 YES,否则输出 NO。
输入输出样例
输入#1
XX. ... .XX
输出#1
YES
输入#2
X.X X.. ...
输出#2
NO
说明/提示
If you are not familiar with the term «central symmetry», you may look into http://en.wikipedia.org/wiki/Central_symmetry
如果你不熟悉“中心对称”这一术语,可以参考 http://en.wikipedia.org/wiki/Central_symmetry
输入解题思路,AI测评打分。不知道怎么写?