#include <iostream>
#include <algorithm>
using namespace std;
struct Point
{
int x = 0;
int y = 0;
};
const int SIZE = 200;
typedef std::vector<Point> Points;
template <typename Projection>
void processPoints(Points& points, Projection p)
{
std::sort(points.begin(), points.end(), [&](Point& lhs, Point& rhs) { return p(lhs) < p(rhs); });
for (auto& point: points)
{
if (p(point) < SIZE)
{
p(point) = SIZE;
}
}
}
void processPointsX(Points& points)
{
processPoints(points, [](Point& p) -> int& { return p.x; });
}
void processPointsY(Points& points)
{
processPoints(points, [](Point& p) -> int& { return p.y; });
}
int main()
{
Points p;
processPointsY(p);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnN0cnVjdCBQb2ludAp7CglpbnQgeCA9IDA7CglpbnQgeSA9IDA7Cn07Cgpjb25zdCBpbnQgU0laRSA9IDIwMDsKCnR5cGVkZWYgc3RkOjp2ZWN0b3I8UG9pbnQ+IFBvaW50czsKCnRlbXBsYXRlIDx0eXBlbmFtZSBQcm9qZWN0aW9uPgp2b2lkIHByb2Nlc3NQb2ludHMoUG9pbnRzJiBwb2ludHMsIFByb2plY3Rpb24gcCkKewogICAgc3RkOjpzb3J0KHBvaW50cy5iZWdpbigpLCBwb2ludHMuZW5kKCksIFsmXShQb2ludCYgbGhzLCBQb2ludCYgcmhzKSB7IHJldHVybiBwKGxocykgPCBwKHJocyk7IH0pOwogICAgZm9yIChhdXRvJiBwb2ludDogcG9pbnRzKQogICAgewogICAgCWlmIChwKHBvaW50KSA8IFNJWkUpCiAgICAJewogICAgICAgIAlwKHBvaW50KSA9IFNJWkU7CiAgICAJfQogICAgfQp9Cgp2b2lkIHByb2Nlc3NQb2ludHNYKFBvaW50cyYgcG9pbnRzKQp7CiAgICBwcm9jZXNzUG9pbnRzKHBvaW50cywgW10oUG9pbnQmIHApIC0+IGludCYgeyByZXR1cm4gcC54OyB9KTsKfQoKdm9pZCBwcm9jZXNzUG9pbnRzWShQb2ludHMmIHBvaW50cykKewogICAgcHJvY2Vzc1BvaW50cyhwb2ludHMsIFtdKFBvaW50JiBwKSAtPiBpbnQmIHsgcmV0dXJuIHAueTsgfSk7Cn0KCmludCBtYWluKCkKewoJUG9pbnRzIHA7Cglwcm9jZXNzUG9pbnRzWShwKTsKCXJldHVybiAwOwp9