"Exam" Math round1# 15/06/22

Source: Internet
Author: User

First say the result, the exam three silly problem, I this tease than only 220, although abused RANK2 70 points, but in our school compared no meaning, this can not AK really see ghost

This exam is elementary number theory, T1 approximate t2t3 only decomposition, T1 all kinds of uncomfortable, t2t3 all kinds of boring

T1 War

Test instructions

There are n points, point right, the right value of the edge of the IJ is gcd (WI,WJ), any two points can be connected to the edge, the maximum spanning tree. N,wi<=1e6.

Nonsense

When you see the data range, the whole person is freaking out.

Then this problem I was the last to do ...

We found WI<=1E6, which is obviously a hint of the rhythm of our barrel.

For each number of WI, look for its approximate

The same as the same as a linked list of the string up

And then traverse each of the list of linked lists Here's a trick like the list with ABC elements and not 22 try Ab,bc,ac even n (n-1)/2 edges only need AB,BC so even n-1 edge

If the former, then we might as well have a normal, violent brain.

Then I used the sqrt (n), so the complexity nsqrt (n)

We can easily get through 1e5, but 1e6 is a bit of a card.

I heard that we all played the ordinary violence, so that there is no motivation, just want to abandon the treatment

And then the data except 1e3 is all 1e6, I am oh hehe, was card into n^2 the same 30 points

Well, I'd like to scold myself for being a jerk after the positive solution.

Why use points to find the edge! Won't you use the side to find some!

Why use numbers to find the approximate number! Of course, to use the number of numbers Ah!

This is the difference between sqrt and log!

Why is the high efficiency of the screen? That's because every number that is found is a direct j+=i!.

Sure enough, my understanding of the algorithm is not too deep! However, with this experience, it will be unforgettable!

This is really not difficult to think, why I do not expect it!

Because at that time only want to abandon cure not thinking optimization, habit is not good, do not want to have a faster equivalent treatment method directly to fight? How could I do that!

Exercises

Enumerate each number from large to small as a gcd, put WI in a bucket and find a connection.

T2 Homework

Test instructions

There is a number x, known as GCD for A1, and the LCM for B is B1, which is the possible case of X.

Nonsense

Boring problem, just a little trouble

I'm not quite sure about why it's 90 points >.< extreme situations?

Exercises

Vigorously decompose the mass factor

According to Gcd=min (Ei,ej), Lcm=max (Ei,ej) discuss it.

T3 Game

Test instructions

The number of 1~n as you choose, multiply up, multiply must be square number, seek the maximum square number.

Exercises

That's the one-eyed question.

We found

Each EI must be an even number as a square

So let's just get greedy and take 1~n.

For those pi ei is odd, just give up the square, equivalent to remove the prime number, there will be no other influence, must be right

  

There's a lot of regrets this time.

But the results are not very bad (but our school is the School of God)

I feel that this kind of examination is better than the test, which can make oneself feel better.

But this test still means something.

At least let me for "do not use the number of numbers to find the number of numbers," the point of unforgettable

Although always know, but really does not necessarily reflect the use of the coming, a lot of knowledge is like this

Tomorrow finally no test ... I can finally get the problem ...

"Exam" Math round1# 15/06/22

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.