Super Agent

本文描述了一个关于密码破译的情境,Pealo是一名来自Porridgia的特工,他的任务是获取Potatoland的秘密土豆泥配方。他通过热传感器探测到了密码输入,现在需要确定密码是否对称。输入是3x3数字键盘的按压情况,输出应判断密码是否对称。此问题涉及逻辑分析和密码学原理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://acs.jxnu.edu.cn/problem/CF12A

描述:

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.

在Potatoland有一个秘密基地,那里的土豆泥是根据一个特殊配方制作的。来自Porridgia的领居决定得到这个配方把它卖给Pilauland。多年来,他们一直在为这次任务做准备。最后,Pealo得知了所有的间谍活动秘密,他潜入了Potatoland并且到达了秘密基地

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.

现在他站在入口,但是为了进入他必须穿过联合封锁。一分钟前一分钟前,一名工人在终端上输入密码并打开了门。终端是一个方形数字键盘3 × 3,数字从1到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.

Pearlo知道密码由不同的数字组成,可能与终端的中央按钮对称。他有一个热传感器,可以让他找到工作人员输入的数字。这个条件能帮助Pearlo减少密码的组合

输入:

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.

如果密码与终端中央按钮对称,则打印“是”,否则打印“否”。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值