0% found this document useful (0 votes)
63 views1 page

Competitive Programming

Greedy pairing of points 1 to 3 and 2 to 4 is suboptimal for the given points, as the best solution pairs 1 to 4 and 2 to 3 instead. The document provides examples of exercises involving greedy algorithms and pairing points, with the first exercise showing a case where greedy pairing does not produce the optimal solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

Competitive Programming

Greedy pairing of points 1 to 3 and 2 to 4 is suboptimal for the given points, as the best solution pairs 1 to 4 and 2 to 3 instead. The document provides examples of exercises involving greedy algorithms and pairing points, with the first exercise showing a case where greedy pairing does not produce the optimal solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Exercise 1.1.

1
Greedy wont work in this case because greedy will make point 1 to pair with 3 and
making 2 and 4 pair but the best solution is point 1 and 3 with point 4 and 2.

1
3
4

Exercise 1.1.2
O(N! * (N-1!))

Exercise 1.1.3

You might also like