luogu#P4717. 【模板】快速莫比乌斯 / 沃尔什变换 (FMT / FWT)
【模板】快速莫比乌斯 / 沃尔什变换 (FMT / FWT)
Problem Description
Given two sequences and of length , define
Compute respectively when is OR, AND, and XOR.
Input Format
The first line contains an integer .
The second line contains numbers .
The third line contains numbers .
Output Format
Output three lines. Each line contains numbers, representing the values of when is OR, AND, and XOR, respectively, taken .
2
2 4 6 8
1 3 5 7
2 22 46 250
88 64 112 56
100 92 68 60
Hint
.
Translated by ChatGPT 5