创想实验室
我们都是梦想家

?(>_o)!

描述

?(>_o)! is a pseudo-object-oriented programming language. It implements the following commands:

Command Description
? Check whether the character ‘?’ is in the program’s source code. If ‘?’ does not exist in the program’s source, the hardware will catch fire or explode.
( It tries to match ‘)’, although mismatch of brackets does not matter at all.
> Increase the internal accumulator.
_ Print the program’s source code.
o Instantiate an object of a new sub class of the generic super class. Due to the best principles of object hiding, this object cannot be accessed in any way.
) Just matches ‘(‘. It’s for patient with obsessive-compulsive disorder. However, mismatch of brackets does not matter at all.
! Print “Hello, world!”.
Other characters Be treated as comments rather than instruction.

However, it’s only another joke programming language. There is even no way to access the accumulator. But it’s one of easiest to finish a “Hello world” program or a quine program. A quine is a computer program which takes no input and produces a copy of its own source code as its only output. Your task is to judge whether a ?(>_o)! program is a quine.

输入

There are multiple test cases. The first line of input is an integer T indicates the number of test cases. For each test case:

There is one line of string represents the source code of a ?(>_o)! program. The program contains no more than 256 characters. The ASCII value of each character is within [32, 126].

输出

For each test case, output “Yes” if it is a quine. Otherwise, output “No”.

样例输入

4
Hello, world!
source_code
source__code
?(>_o)!

样例输出

Yes
Yes
No
No

代码

 

网站所发布的代码已提交通过,代码可能经过修改防止抄袭,未经允许不得转载:创想实验室 » ?(>_o)!
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址