module AtCoder::Convolution

Overview

Implements atcoder::convolution.

a = [AtCoder::ModInt998244353.new(1_i64)] * 3
AtCoder::Convolution.convolution(a, a) # => [1, 2, 3, 2, 1]

Defined in:

convolution.cr

Class Method Summary

Class Method Detail

def self.convolution(a : Array(T), b : Array(T)) forall T #

Implements atcoder::convolution.convolution.

TODO Support for int


[View source]
def self.convolution_ll(a : Array(Int64), b : Array(Int64)) #

Implements atcoder::convolution.convolution_ll.


[View source]