标签归档:卷积

[hdu 4609][13多校] 3-idiots

Problem 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 performance art, and begged the king to free them. Out of hatred to the real idiots, the king wanted to check if they were lying. The three men were sent to the king's forest, and each of them was asked to pick a branch one after another. If the three branches they bring back can form a triangle, their math ability would save them. Otherwise, they would be sent into jail.
However, the three men were exactly idiots, and what they would do is only to pick the branches randomly. Certainly, they couldn't pick the same branch - but the one with the same length as another is available. Given the lengths of all branches in the forest, determine the probability that they would be saved.

继续阅读

<从入门到崩溃>快速傅里叶变换学习笔记

绪论

在信息学竞赛中常有这样一类入门题:A+B,A-B,A*B,A/B,在选手大呼太水之际,某脑洞大开之人加强了A*B的数据,这样就使得O(n^{2})的选手血崩,那么,这个时候就需要一种新的手段来解决这个问题,就此,快速傅里叶变换诞生了。

储备知识

多项式

系数表达式

f(x)=\sum_{i=0}^{n}a_{i}x^{i}为一n次多项式,其中,a_{i}称作系数。

定义:多项式的次数等于非零系数项的最高次幂

继续阅读