QOJ.ac

QOJ

Time Limit: 4 s Memory Limit: 512 MB Total points: 100 Hackable ✓

#85. Rzadki splot XOR

Statistics

Dane są $n, m, k$ oraz $m$ par ciągów $(a_i, b_i)$, gdzie $|a_i|=|b_i|=d_i$. Dla każdego $0\leq t < 2^n$ oblicz: $$ S_t=\sum_{c \in C_t}\prod_{i=1}^m b_{i,c_i} \pmod {10^{18}+125953} $$

gdzie $C_t$ jest zbiorem wszystkich ciągów $c$ spełniających $1\leq c_i\leq d_i$ oraz $\oplus_{i=1}^m a_{i,c_i}=t$.

W pierwszej linii podano trzy liczby całkowite dodatnie $n, m, k$.

Następnie wczytywane są kolejno $F_1, \dots, F_m$.

Dla każdego $F_i$:

W pierwszej linii podano liczbę całkowitą dodatnią $d_i$.

W kolejnej linii podano $d_i$ nieujemnych liczb całkowitych $a_{i,j}$.

W kolejnej linii podano $d_i$ dodatnich liczb całkowitych $b_{i,j}$.

Wypisz w jednej linii $2^n$ liczb całkowitych $S_0, \dots, S_{2^n-1}$.

Przykład

Wejście 1

4 3 4
3
5 1 4
1 1 4
4
8 2 7 3
11 13 9 6
4
10 0 2 2
7 9 8 3

Wyjście 1

165 539 135 518 737 407 911 410 105 442 0 121 865 358 484 121

$1\leq n \leq 20$, $1\leq d_i\leq k\leq 10$, $\sum_i 2^{d_i}\leq 2^{17}$, $0\leq a_{i,j}<2^n$, $1\leq b_{i,j} < P$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.