Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我看到这个SBStr1时,我正在解决 SPOJ 的问题。我学了一点 WhiteSpace 语言,但我只能达到循环。 谁能帮我检查一个字符串是否有另一个字符串作为 WhiteSpace 中的子字符串?
我不会为您编写空白代码,但您可以采用以下方法轻松转换为空白:
24 times: read 10 bit number into A skip space read 5 bit number into B skip newline if (A>>0)%32 == B or (A>>1)%32 == B or ... or (A>>5)%32: print 1 else: print 0 print newline
您可以通过重复除以 2 来实现位移。