HackerRank "Vertical Rooks"
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了HackerRank "Vertical Rooks"相关的知识,希望对你有一定的参考价值。
Please note: VROOK cannot go back-ward - that leads to a simple variation to Game of Nim: just XOR.
t = int(input()) for _ in range(t): n = int(input()) # Get input p1 = [] for _ in range(n): p1.append(int(input())) p2 = [] for _ in range(n): p2.append(int(input())) # Game of Nim nim = 0 for i in range(n): nim ^= abs(p2[i]- p1[i]) - 1 print ("player-2" if nim != 0 else "player-1")
以上是关于HackerRank "Vertical Rooks"的主要内容,如果未能解决你的问题,请参考以下文章
android:orientation = "horizontal" 和 android:orientation = "vertical"
MSSQL Select with "vertical"-where