Skip to content

Instantly share code, notes, and snippets.

@Tokiyomi
Created October 24, 2022 07:19
Show Gist options
  • Save Tokiyomi/5c899696d78b582d24bdda71358ab45f to your computer and use it in GitHub Desktop.
Save Tokiyomi/5c899696d78b582d24bdda71358ab45f to your computer and use it in GitHub Desktop.
# Main in python
def main():
T = int(input())
for t in range(T):
N = int(input()) # Read N
if N==-1:
break
A = powers_of_two(N) # Generate our A set
print(' '.join(map(str, A)))
B = list(map(int, input().split())) # Read the B set provided by machine
# Solve case
C = solve_sum(A,B)
print(' '.join(map(str, C)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment