At about on January 26, May 15, NTT was deployed in 14 prefectures in the East Japan region, all NTT flets optical fiber networks and IP Phones using optical fiber networks are suddenly unavailable. In Japan, where IP phones are widely used to replace traditional phones, this is a very serious accident. Nearly 3 million of network users and 0.6 million of IP phone users are affected. After urgent repairs by
combined number and the number. N, K, a []
Ideas:Consider it as a polynomial of 1000000 items. If a [] = x exists, the coefficient of X is 1, and then the polynomial is automatically multiplied K times. The part with the coefficient not 0 indicates that K numbers can exist, you can use FFT + quick power. To avoid precision errors, change non-zero values to 1 after each quick power to avoid errors after it becomes very large, complexity O (1000000 * log000000 * logk), which is a little large. T
(In fact, this article should be written as "debugging techniques with FFT discussion + code problem method", the language is not good to write articles on tricky qaq)There are suggestions to welcome, there are omissions Welcome to add!FFT (Fast Fourier transform)/ntt (number theory transformation) is a common and practical optimization of convolution operationsBut the FFT/NTT process is not as visually ref
Today's a question, bare ntt, but I will not, so White sent 50 points.So he came to learn about NTT.The surface is very simple, do not bother to post, that is not the point I want to say.The emphasis is on NTT, also called the Fast number theory transformation.In many problems, we may encounter the polynomial multiplication problem in the mode meaning, when the traditional fast Fourier transform may not sat
The principle of rapid number theory change (NTT) is actually the same principle as the fast Fourier transform. For the Fermat prime of a shape such as m= c*2^n+1, it is assumed that its original root is G. So deceive g^ (m-1) ==1 and just (m-1) can divide 2^n. So the NTT transform can be performed in the modulo p field. The rotation factor is g^ ((m-1)/n). The other principles are the same as the FFT princ
Pick http://blog.csdn.net/coldef/article/details/57908865
Last time to do a set of simulation game, which need to ask the natural number k power and, then I will only n^2 ... I remember N^2 has 20 points, Nlogn can burst to 90 points ...--鏼 鏼 鏼 2015 national team paper
It's probably just this polynomial to get the inverse, find the generating function.This is O (NLOGN) O (n\log N), but the modulus of this problem is not the prime number that satisfies the requirements of
NTT can easily explode int
First to find the original root of the program (it seems that the original root of the NTT are 3)Code
#include
NTT: (prime numbers are random, generally speaking, the original number of prime numbers is 3, but for the sake of insurance recommended to call a Huangen program)
#include
The first time you cut NTT, feel that NTT is the model version of the FFT, specifically can see http://blog.csdn.net/acdreamers/article/details/39026505 speak very clearly
And then the coefficients can be preprocessed out, the time can be reduced a lot, but I am the template for the brevity or in the thinking of coefficients.
Said so much nonsense, the following we get to the point: the topic of the simples
NTT
Aw, it's simple.
The FFT F-F-T FFT can be accelerated due to the good nature of having the primary n units root wn=e2πin w n = e 2πi n w_n=e^{\frac{2\pi i}{n}}. In the natural number field, modulo p p p, the WN w n w_n can be replaced with gp−1n g p−1 n G^{\frac{p-1}{n}}, G G g is the root of P p p, it can be found that those properties are similar. The inverse transformation also converts gp−1n g p−1 n G^{\frac{p-1}{n}} to g−p−1n g−p−1 n g^{-\f
I will NTT. It's fake. I will be polynomial to inverse. It's fake. I can count Sterling. It's fake.
The official explanation is Cdq+ntt or polynomial inversion, but I'm not GG.Fortunately there is a kind of direct NTT, to kneel Orz
ANS=∑I=0N∑J=0ISI,JX2JX (j!) Ans=\sum\limits_{i=0}^n\sum\limits_{j=0}^is_{i,j}\times2^j\times (j!)SI,J=1J!∑K=0J (−1) kckj (j−k) I s_
The wireless broadband technology has been favored by many people. Its excellent performance has become a leader in wireless technology. Even so, it also has many drawbacks. So what is the bottleneck of its development? Let's take a look at the problems in the development of wireless broadband access products.
As a new access technology, broadband wireless access
A Broadband Router is one of the best solutions for shared bandwidth connections. Compared with the proxy server, the Broadband Router has four advantages: first, no maintenance is required. Once the configuration is successful, no management is required; second, the operation is stable; third, no computer is required as the proxy server, this can effectively save energy and reduce costs. Fourth, some
In the previous article, we introduced the installation and configuration of wireless broadband through "wireless broadband 1X and wireless broadband 3G-Wireless Broadband User Manual 1. Next, let's talk about the wireless broadband access content and its software content.
Many friends in the dial-up connection when the broadband connection is slow and annoying, in particular, novice friends often encounter broadband connection slow but helpless, below to share how to solve the problem of slow broadband connection. First of all, we must first find the cause of the slow computer boot broadband
Many people do not record their own broadband account password, generally directly set up in the original router, after that can automatically dial, the Internet is very convenient. But if you buy a new router or we need to restore the original router to the factory setting, you need to reset it, you need to use the Broadband account password. If you forget the broadban
Prepare to install broadband in the relocated house. Seeing the advertisement of China Mobile at the stairway, mobile broadband can be used for one month, and only 50 RMB per month for 2 m,If you think it is inexpensive, you can call 10086 for trial registration. It is very convenient to handle. You only need to register a mobile phone number and do not need the initial installation fee.In the afternoon, th
The 《21Century Economic ReportItVersion, half version of the report on the recent trends of China Netcom and Tian yunning.
Opportunities for China Netcom's broadband breakthrough
As the only one of the four major carriers that has not yet logged on to the overseas capital market, China Netcom is currently far from competitive. Tian Yining said: "the past three years are the initial stage of our strategy formulation and implementation. In the next
Dialupass is a software that can view the password of a broadband dial-up account that has been saved on this computer, and supports WinXP, Win7, Win8, and Win10. The use of the method is very simple, as long as the open Dialupass, the computer saved broadband account and password will be displayed.
Routerpassview How to use Routerpassview you can view the broad
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.