arrangement of 1~n, and then given Q query, each time an interval [l,r], in the [l,r] this interval to find the largest gcd (a, B), {lAnalysisHere I link a Daniel's puzzle, I think he is very good at solving the puzzle. I just add that HDU has a set of data is definitely wrong,1111 1The correct answer is 1. However, Hangzhou Electric's data is indeed 0 ...I wa for a few hours but I can't solve it. Tragedy, Woo-hoo ~~~~~/****************************>>>>headfiles
Copyright NOTICE: This a
| We have carefully selected several similar problems for you:5283 5282 5280 5279 5278Test instructions: There are n numbers, which is an arrangement of the 1~n. There are m inquiries, each asking an interval, asking from this interval, take two numbers of the largest greatest common divisor.First, the query by the right interval in ascending order, in the array is inserted sequentially, record the current number of factors where the occurrence of the position, if there is a previous occurrence
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.