Language: C++

#include<bits/stdc++.h>
const int M=100001;
struct pt{double x,y;};
double cross(pt o,pt a,pt b){return (a.x-o.x)*(b.y-o.y)-(a.y-o.y)*(b.x-o.x);}
bool ptcomp(pt a,pt b){return make_pair(a.x,a.y)<make_pair(b.x,b.y);}
pt p[M];
vector<pt>hull;
int n;
void makeUB()
{
	hull.push_back(p[0]);
	for(int i=1;i<n;i++)
	{
		while(hull.size()>1 && cross(hull[hull.size()-2],hull.back(),p[i])>0)
			hull.pop_back();
		hull.push_back(p[i]);
	}
}
void makeLB()
{
	int hs=hull.size();
	for(int i=n-2;i>=0;i--)
	{
		while(hull.size()>hs && cross(hull[hull.size()-2],hull.back(),p[i])>0)
			hull.pop_back();
		hull.push_back(p[i]);
	}
}
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>p[i].x>>p[i].y;
	sort(p,p+n,ptcomp);
	//cout<<p[n-1].x<<" "<<p[n-1].y<<endl;
	makeUB();//upper bound
	makeLB();//lower bound
	cout<<hull.size()-1<<endl;
	for(int i=hull.size()-1;i>0;i--)
		cout<<hull[i].x<<" "<<hull[i].y<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'bool ptcomp(pt, pt)':
a.cc:5:31: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
    5 | bool ptcomp(pt a,pt b){return make_pair(a.x,a.y)<make_pair(b.x,b.y);}
      |                               ^~~~~~~~~
      |                               std::make_pair
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,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc: At global scope:
a.cc:7:1: error: 'vector' does not name a type
    7 | vector<pt>hull;
      | ^~~~~~
a.cc: In function 'void makeUB()':
a.cc:11:9: error: 'hull' was not declared in this scope
   11 |         hull.push_back(p[0]);
      |         ^~~~
a.cc: In function 'void makeLB()':
a.cc:21:16: error: 'hull' was not declared in this scope
   21 |         int hs=hull.size();
      |                ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   31 |         cin>>n;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:34:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   34 |         sort(p,p+n,ptcomp);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:38:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   38 |         cout<<hull.size()-1<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:38:15: error: 'hull' was not declared in this scope
   38 |         cout<<hull.size()-1<<endl;
      |               ^~~~
a.cc:38:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   38 |         cout<<hull.size()-1<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~