Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
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();
//		cout<<p[i].x<<" "<<p[i].y<<" hull "<<hull.size()<<endl;
		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:7:31: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
    7 | 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/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:9:1: error: 'vector' does not name a type
    9 | vector<pt>hull;
      | ^~~~~~
a.cc: In function 'void makeUB()':
a.cc:13:9: error: 'hull' was not declared in this scope
   13 |         hull.push_back(p[0]);
      |         ^~~~
a.cc: In function 'void makeLB()':
a.cc:24:16: error: 'hull' was not declared in this scope
   24 |         int hs=hull.size();
      |                ^~~~
a.cc: In function 'int main()':
a.cc:34:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   34 |         cin>>n;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:37:9: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   37 |         sort(p,p+n,ptcomp);
      |         ^~~~
      |         std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:3:
/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:41:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   41 |         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:41:15: error: 'hull' was not declared in this scope
   41 |         cout<<hull.size()-1<<endl;
      |               ^~~~
a.cc:41:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   41 |         cout<<hull.size()-1<<endl;
      |                              ^~~~
      |                              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~