Greedy Students GRDSTD SOLUTION Code Chef
Greedy Students Solution
There are K students (numbered 1 through K). To prevent the students from choosing the same polygon over and over, Rafid told them that they have to choose polygons one by one in the order from student 1 to student K and each student has to choose a set of points which was not chosen by any earlier student. Greedy Students solution . That means they have to choose K different sets of points, resulting in K different polygons. As a result, some students may end up unable to choose any polygon.
- The first student chooses the largest polygon ABCD with area 100.Greedy Students Solution
- The next four students choose the triangles ABC, BCD, CDA and DAB, each with area 50. Note that for example, the polygon AECB is not convex because it has one internal angle equal to 180∘.
- The next four students choose the triangles AEB, BEC, CED and DEA, each with area 25.Greedy Students Solution
- There are no more polygons the students can choose, so the remaining six students are left without a polygon.
January Long Challenge 2021
- Chef and Division 3 DIVTHREE SOLUTION Code Chef
- Encoded String DECODEIT SOLUTION Code Chef
- Point Of Impact BILLRD SOLUTION Code Chef
- Fair Elections FAIRELCT SOLUTION Code Chef
- Watching CPL WIPL SOLUTION Code Chef
- Chef and Ants ANTSCHEF SOLUTION Code Chef
- Blackjack BLKJK SOLUTION Code Chef
- And-Or Game ORAND SOLUTION Code Chef
- Stack-Queue Sort (Challenge) SQSORT SOLUTION Code Chef
- Expected Number of SCCs RCTEXSCC SOLUTION Code Chef
- Curious Matrix CURMAT SOLUTION Code Chef
- Cool Subsets COOLSBST SOLUTION Code Chef
- Sequence Creation ARCRT SOLUTION Code Chef
- Greedy Students GRDSTD SOLUTION Code Chef