主页 讨论版 问题 名次 状态 统计

[提交][状态][讨论版]

## 题目描述

Several Orz Pandas are in a line. However, God Wan is coming from left, while God Big Bread is coming from right. They're both very diaoable so Orz Pandas must hail to both of them.

The captain of Orz Pandas, CupSpirit, has invented a special 0-1 string to solve this problem. Assume S0 is an empty string, and

i>0 Si = switch(Si-1)+”1”+reverse(Si-1)

Here “+” means concatenation of strings. reverse(x) means the result of reverting the string x, for example reverse(“100”)=”001”. And switch(x) means every '0' becomes '1' and every '1' becomes '0', for example switch(“100”)=”011”.

Now Captain CupSpirit has selected string SN to determine the direction of all Orz Pandas. If SN[i]=='0', the i-th Orz Panda should hail to God Wan. Otherwise the i-th Orz Panda should hail to God Big Bread. For example, if N = 3, the Orz Pandas would be like

Please determine the direction of K-th Orz Panda.

## 输入

There are multiple test cases, please process to EOF. For each test case:

The first line contains two integers N and K.

For all test cases, 1N1018, 1≤Kmin(|SN|, 1018)

## 输出

For each test case, output one line. If this Orz Panda is hailing to God Wan, output “Orz”. Otherwise output “srO”.

```3 1
3 2
3 3
3 4
3 5
3 6
3 7```

```srO
Orz
Orz
srO
srO
srO
Orz```

S1=”1”

S2=”011”

S3=”1001110”

[提交][状态][讨论版]