- Code: Select all
struct Point { int x, y; };
struct Polygon { std::vector<Point> points; };
void draw_polygon(const Polygon& polygon);
- The coordinates (0, 5) refer to a point exactly halfway across the first column and exactly halfway down the sixth row in the console. The coordinates will not extend beyond column #70 or row #20.
- You must draw the edges using symbols such as /, \, -, |, * and so on. The rules are loose here, but the outline should look roughly 'right'.
- You must fill the polygon with a symbol distinct from the ones you used to draw the edges.
- The polygon might not be convex. In fact, it might even overlap itself. You must fill the 'odd-numbered' regions and not the 'even-numbered' regions. See this image for an idea of what to do.
- Optimise for code clarity. This will be judged subjectively by the forum-goers.
- The deadline is November 6.
- There has been some confusion about my coordinate system. Please refer to this image for a visual explanation.
- The contest has been split into three divisions.
- An entry in the easy division only needs to deal with convex polygons.
- An entry in the intermediate division also needs to deal with concave polygons.
- An entry in the hard division also needs to deal with self-overlapping polygons.
Deadline extended to 10 November.
