随笔分类 -  ACM-FFT&FWT&NTT

摘要:题面 Description As an eligible Ingress Resistance Agent you should know your power source, the Exotic Matter. We call it XM, which is the driving force 阅读全文
posted @ 2020-01-31 18:06 Artoriax 阅读(172) 评论(0) 推荐(0)
摘要:| NTT(快速数论变换)用到的各种素数及原根 | | | | | : : | : : | : : | : : | | g是mod(r 2 ^ k + 1)的原根 | | | | | r 2 ^ k + 1 | r | k | g | | 3 | 1 | 1 | 2 | | 5 | 1 | 2 | 阅读全文
posted @ 2020-01-31 17:42 Artoriax 阅读(517) 评论(0) 推荐(0)
摘要:题面 Description There are $k$ piles of stones in a circle, numbered from $0$ to $k 1$, where the number of the stones in each pile is $n$ initially. Yo 阅读全文
posted @ 2020-01-30 12:37 Artoriax 阅读(270) 评论(0) 推荐(0)
摘要:题面 Description Give you two arrays $A[0..2^m 1]$ and $B[0..2^m 1]$. Please calculate array $C[0..2^m 1]$: $$ C[k]=\sum_{i~and~j=k}A[i~xor~j] B[i~or~j] 阅读全文
posted @ 2020-01-29 22:45 Artoriax 阅读(127) 评论(0) 推荐(0)
摘要:Description You are given a table consisting of n rows and m columns. Each cell of the table contains either 0 or 1. In one move, you are allowed to p 阅读全文
posted @ 2020-01-14 09:40 Artoriax 阅读(133) 评论(0) 推荐(0)
摘要:Description Byteasar has a tree $T$ with $n$ vertices conveniently labeled with $1,2,...,n$. Each vertex of the tree has an integer value $v_i$. The v 阅读全文
posted @ 2020-01-13 16:45 Artoriax 阅读(109) 评论(0) 推荐(0)
摘要:Description Claris和NanoApe在玩石子游戏,他们有n堆石子,规则如下: 1. Claris和NanoApe两个人轮流拿石子,Claris先拿。 2. 每次只能从一堆中取若干个,可将一堆全取走,但不可不取,拿到最后1颗石子的人获胜。 不同的初始局面,决定了最终的获胜者,有些局面下 阅读全文
posted @ 2020-01-13 16:24 Artoriax 阅读(80) 评论(0) 推荐(0)
摘要:Description Let’s assume there is a new chess piece named Super rook. When placed at a cell of a chessboard, it attacks all the cells that belong to t 阅读全文
posted @ 2020-01-13 16:01 Artoriax 阅读(237) 评论(0) 推荐(0)
摘要:Description You're given a sequence s of N distinct integers. Consider all the possible sums of three integers from the sequence at three different in 阅读全文
posted @ 2020-01-13 15:37 Artoriax 阅读(216) 评论(0) 推荐(0)
摘要:Description King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that it was a kind of 阅读全文
posted @ 2020-01-13 15:16 Artoriax 阅读(112) 评论(0) 推荐(0)
摘要:Description Given $N$ integers in the range $[ 50\, 000, 50\, 000]$, how many ways are there to pick three integers $a_ i$, $a_ j$, $a_ k$, such that 阅读全文
posted @ 2020-01-13 11:41 Artoriax 阅读(308) 评论(0) 推荐(0)
摘要:Description Calculate A B. Input Each line will contain two integers A and B. Process to end of file. Note: the length of each integer will not exceed 阅读全文
posted @ 2020-01-13 11:14 Artoriax 阅读(233) 评论(0) 推荐(0)