Logo
(追記) (追記ここまで)

21879번 - XOR sum 서브태스크다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB194428.571%

문제

You have an array of $n$ $k$-bit numbers $a_1, a_2, \ldots, a_n$.

You need to calculate $\sum_{i=1}^{n} \sum_{j=i+1}^{n} (a_i \oplus a_j)^x$.

Operation $a \oplus b$ is bitwise exclusive OR of two numbers $a$ and $b$.

Since the answer can be very large, output it modulo 998ドル,244円,353円$.

입력

The first line of the input contains three integers $n, k, x$ (1ドル \leq n, k, n \cdot k \leq 300,000円,ドル 1ドル \leq x \leq 3$) --- length of an array, number of bits in each number and the power of exclusive OR operations results in the sum.

Next $n$ lines contain array elements.

The $i$-th of them contains string $s_0, s_1, \ldots, s_{k-1},ドル consisting of '0' and '1'.

Then $a_i = $ $\sum_{i=0}^{k-1} s_i \cdot 2^i$.

출력

Print one number --- the remainder of division of the sum of $x$-th powers of exclusive OR results of all pairs of numbers in the array by 998ドル,244円,353円$.

제한

서브태스크

번호배점제한
15

$n \leq 5000, k \leq 30$

25

$n \cdot k \leq 5000$

35

$k \leq 30,ドル $a_i = 2^{b_i}$ for some $b_i$

410

$k \leq 20$

510

$x = 1, n \cdot k \leq 300,000円$

615

$x \leq 2, n \cdot k \leq 100,000円$

710

$x \leq 2, n \cdot k \leq 300,000円$

815

$n \cdot k \leq 100,000円$

910

$n \cdot k \leq 200,000円$

1015

$n \cdot k \leq 300,000円$

예제 입력 1

3 3 1
101
001
001

예제 출력 1

2

예제 입력 2

2 6 3
101111
011001

예제 출력 2

19683

힌트

In the first sample array contains integers $[5, 4, 4],ドル and the answer is $(5 \oplus 4) + (5 \oplus 4) + (4 \oplus 4) = 1 + 1 + 0 = 2$.

In the second sample array contains integers $[61, 38],ドル and the answer is $(61 \oplus 38)^3 = 27^3 = 19683$.

출처

Contest > Innopolis Open in Informatics > Innopolis Open, First elimination round, 2018-2019 E번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
  • 이 문제의 채점 우선 순위는 2이다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /