{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Given any two arbitrary polygons, determine their intersection region if it exists."}},{"title":"input","value":{"format":"MD","content":"The input file contains several sets of input.\n\nEach set will consist of two polygon description. Each polygon description begins with a positive\ninteger n corresponding to the number of vertices, followed by n lines with each line containing a pair of integer (x, y) representing the x and y coordinates of a polygon vertex. The vertices will be given in clockwise traversal order and no two polygon edges would overlap. You should terminate your program\nif n \u003c 3. You may assume all integer input is less than or equal to 100."}},{"title":"output","value":{"format":"MD","content":"For each set of input follow the output description below.\n\nIf the two convex polygons do not intersect then print out 0. Otherwise, print out the number\nof points in the intersecting region of the input polygons, followed by the points. The output must begin with the bottom leftmost point and must be listed in lexicographical ordering. Your answers must be rounded up to two digits after the decimal point."}},{"title":"example","value":{"format":"MD","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n \u003cb\u003eInput\u003c/b\u003e\n \u003c/div\u003e\n \u003cpre\u003e\n3\n0 0\n0 2\n2 2\n4\n5 5\n5 10\n10 10\n10 5\n4\n1 1\n5 1\n5 5\n1 5\n4\n3 0\n6 3\n3 6\n0 3\n0\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n \u003cb\u003eOutput\u003c/b\u003e\n \u003c/div\u003e\n \u003cpre\u003e\n0\n8\n1.00 2.00\n1.00 4.00\n2.00 1.00\n2.00 5.00\n4.00 1.00\n4.00 5.00\n5.00 2.00\n5.00 4.00\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"explaination","value":{"format":"MD","content":"explanation of the second test case:\u003cbr\u003e\n\n\u003cimg src\u003d\"https://i.imgur.com/J5E12Zl.png\" alt\u003d\"pasteboard.co/JT9lG8Z.png\"\u003e \n\u003c!--\u003cblockquote class\u003d\"imgur-embed-pub\" lang\u003d\"en\" data-id\u003d\"a/9uBceph\" data-context\u003d\"false\" \u003e\u003ca href\u003d\"//imgur.com/a/9uBceph\"\u003e\u003c/a\u003e\u003c/blockquote\u003e\u003cscript async src\u003d\"//s.imgur.com/min/embed.js\" charset\u003d\"utf-8\"\u003e\u003c/script\u003e--\u003e"}}]}