Submission #1180779

#TimeUsernameProblemLanguageResultExecution timeMemory
1180779tempuser10Football (info1cup20_football)Pypy 3
100 / 100
577 ms81272 KiB
def solve(l, k):
  if max(l) <= 1 or k == 1 or sum(l) % 2:
    return sum(l) % 2
  ll = [x // 2 for x in l]
  return solve(ll, k//2)

t = int(input())
s = '' 
for i in range(t):
  n, k = map(int, input().split())
  l = list(map(int, input().split()))
  s+= '1' if solve(l, k) else '0'
print(s) 

Compilation message (stdout)

Compiling 'football.py'...

=======
  adding: __main__.pyc (deflated 34%)

=======
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...