dijagonale
You are given a convex polygon with p points(p<10000). Some of its diagonals have been drawn. No two diagonals intersect. Write an algorithm which finds the sub polygon with the most edges, such that its edges are the edges of the polygon and/or the diagonals drawn, such that there isn’t any diagonal inside of it.
InputInput: The first line of the standard input contains numbers N(N<=100000) and M, where N represents the number of the points of the polygon, and M represents the number of the diagonals drawn. The next M lines contain the description of each of the diagonals (its starting and ending point).
OutputThe first and only line of the standard output should contain one number, the number of edges of the sub polygon with the most of the edges.
Input:
Output:
10 4
3 1
5 9
6 8
10 4Output:
4Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.