Language: C++

#include "bits/stdc++.h"

using namespace std;
using ll = long long;
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
	REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
	REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}

//誤差修正用
const double EPS = 1e-8;

//円周率
const double PI = acos(-1);

//double型の値が等しいか
inline bool eq(double a, double b) { return fabs(b - a) < EPS; }

//点に関する構造体
struct Point
{
	double x, y;

	Point() {}

	Point(double x, double y) : x(x), y(y) {}

	//加減、スカラー倍、乗算など
	Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }

	Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }

	Point operator*(const double b) const { return Point(x * b, y * b); }

	Point operator*(const Point &b) const { return Point(x * b.x - y * b.y, x * b.y + y * b.x); }

	Point operator/(const double b) const { return Point(x / b, y / b); }

	bool operator<(const Point &b) const { return x != b.x ? x < b.x : y < b.y; }

	bool operator==(const Point &b) const { return eq(x, b.x) && eq(y, b.y); }

	//大きさの二乗
	double norm() { return x * x + y * y; }

	//逆正接（x軸正方向からの反時計回り回転角）
	double arg() { return atan2(x, y); }

	//大きさ
	double abs() { return sqrt(norm()); }

	//反時計回りにθ回転
	Point rotate(double theta) { return Point(cos(theta) * x - sin(theta) * y, sin(theta) * x + cos(theta) * y); }

	//反時計回りにπ/2回転
	Point rotate90() { return Point(-y, x); }

	friend ostream &operator<<(ostream &os, Point &p) { return os << p.x << " " << p.y; }

	friend istream &operator>>(istream &is, Point &a) { return is >> a.x >> a.y; }
};

//外積
double cross(const Point &a, const Point &b)
{
	return a.x * b.y - a.y * b.x;
}

//内積
double dot(const Point &a, const Point &b)
{
	return a.x * b.x + a.y * b.y;
}

//直線に関する構造体
//直線が通る2点で表す
struct Line
{
	Point a, b;

	Line() {};

	Line(Point a, Point b) : a(a), b(b) {};

	friend ostream &operator<<(ostream &os, Line &p) { return os << "(" << p.a.x << "," << p.a.y << ") to (" << p.b.x << "," << p.b.y << ")"; }

	friend istream &operator>>(istream &is, Line &a) { return is >> a.a.x >> a.a.y >> a.b.x >> a.b.y; }
};

//多角形
typedef vector< Point > Polygon;

//3点の位置関係を判定
int ccw(const Point &a, Point b, Point c)
{
	b = b - a, c = c - a;

	//a→bで反時計回りの方向にc
	if (cross(b, c) > EPS) return +1;

	//a→bで時計回りの方向にc
	if (cross(b, c) < -EPS) return -1;

	//c→a→bで一直線
	if (dot(b, c) < 0) return +2;

	//a→b→cで一直線
	if (b.norm() < c.norm()) return -2;

	//a→c→bで一直線
	return 0;
}

//2直線の平行判定
bool IsParallel(const Line& a, const Line& b) {
	return abs(cross(a.b - a.a, b.b - b.a)) < EPS;
}

//点集合（多角形）の凸包を求める
//Andrew's Monotone Chain
//O(NlogN)（ソート依存）
Polygon Convex_Hull(Polygon& p) {
	int n = p.size(), k = 0;
	if (n >= 3) {
		sort(p.begin(), p.end());
		vector< Point > ch(2 * n);
		for (int i = 0; i < n; ch[k++] = p[i++]) {
			while (k >= 2 && cross(ch[k - 1] - ch[k - 2], p[i] - ch[k - 1]) < 0) --k;
		}
		for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = p[i--]) {
			while (k >= t && cross(ch[k - 1] - ch[k - 2], p[i] - ch[k - 1]) < 0) --k;
		}
		ch.resize(k - 1);
		return ch;
	}
	else {
		return p;
	}
}

//2直線の交差判定
bool Intersect(const Line &l, const Line &m)
{
	return abs(cross(l.b - l.a, m.b - m.a)) > EPS || abs(cross(l.b - l.a, m.b - l.a)) < EPS;
}

//2直線の交点
Point Crosspoint(const Line &l, const Line &m)
{
	double A = cross(l.b - l.a, m.b - m.a);
	double B = cross(l.b - l.a, l.b - m.a);
	if (abs(A) < EPS && abs(B) < EPS) return m.a;
	return m.a + (m.b - m.a) * B / A;
}

#define curr(P, i) P[i]
#define next(P, i) P[(i+1)%P.size()]

//凸多角形の切断
//直線に対して左側にある部分（交点を含む）を返す
Polygon ConvexCut(Polygon &U, Line l)
{
	Polygon ret;
	for (int i = 0; i < U.size(); i++) {
		Point now = curr(U, i), nxt = next(U, i);
		if (ccw(l.a, l.b, now) != -1) ret.push_back(now);
		if (ccw(l.a, l.b, now) * ccw(l.a, l.b, nxt) < 0) {
			ret.push_back(Crosspoint(Line(now, nxt), l));
		}
	}
	return (ret);
}

//多角形の面積
//ただし返り値は求めたい値の2倍になっている
double Area2(const Polygon &p)
{
	double A = 0;
	for (int i = 0; i < p.size(); ++i) {
		A += cross(p[i], p[(i + 1) % p.size()]);
	}
	return A;
}

int main() {
    int n;
    int poi;
    Polygon m;
    Point z;
    cin >> n;
    m.assign(n,z);
    for(int i = 0;i<n;i++) {
        cin >> m[i].x >> m[i].y;
    }
    m = Convex_Hull(m);
    cout << m.size() << endl;
    poi = 0;
    for(int i=0;i<m.size();i++) { 
        if(m[i].y > m[i+1]) p=i+1;
        else break;
    }
    for(int i = p;i<m.size();i++) {
        cout <<  m[i].x << " "<<  m[i].y << endl;
    }
    for(int i = 0;i<p;i++) {
        cout <<  m[i].x << " "<<  m[i].y << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:208:19: error: no match for 'operator>' (operand types are 'double' and '__gnu_cxx::__alloc_traits<std::allocator<Point>, Point>::value_type' {aka 'Point'})
  208 |         if(m[i].y > m[i+1]) p=i+1;
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
                 from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1176 |     operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1236 |     operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1329 |     operator>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1403 |     operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   '__gnu_cxx::__alloc_traits<std::allocator<Point>, Point>::value_type' {aka 'Point'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1497 |     operator>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
 1573 |     operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   '__gnu_cxx::__alloc_traits<std::allocator<Point>, Point>::value_type' {aka 'Point'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1673 |     operator>(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
 1058 |     operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::pair<_T1, _T2>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  462 |     operator>(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  507 |     operator>(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1714 |     operator>(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1774 |     operator>(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
  695 |     operator> (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
  702 |     operator> (basic_string_view<_CharT, _Traits> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
  710 |     operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
      |     ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   'Point' is not derived from 'std::basic_string_view<_CharT, _Traits>'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 3915 |     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note:   template argument deduction/substitution failed:
a.cc:208:26: note:   mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'double'
  208 |         if(m[i].y > m[i+1]) p=i+1;
      |                          ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, clas