当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
Consider a binary string (b1…bN) with N binary digits. Given such a string, the matrix of Figure 1 is formed from the rotated versions of the string.
b1 | b2 | … | bN−1 | bN |
b2 | b3 | … | bN | b1 |
… | ||||
bN−1 | bN | … | bN−3 | bN−2 |
bN | b1 | … | bN−2 | bN−1 |
The first line contains one integer N ≤ 3000, the number of binary digits in the binary string. The second line contains N integers, the binary digits in the last column from top to bottom.
The first line contains N integers: the binary digits in the first row from left to right.
5 1 0 0 1 0
0 0 0 1 1
时间上限 | 内存上限 |
1000 | 65536 |