Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;

typedef long long LL;
typedef long double LD;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<int,pair<bool,double> > P2;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
#define min_3(a,b,c) min(a,min(b,c))
#define max_3(a,b,c) max(a,max(b,c))
#define mp1(a,b,c) P1(a,P(b,c))
#define mp2(a,b,c) P2(a,pair<bool,double>(b,c))
#define pque(a) priority_queue<a>
#define rpque(a) priority_queue<a,vector<a>,greater<a>>

const int INF=1000000000;
const int dre_4[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
const int dre_8[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};
const int kaijou[10]={1,1,2,6,24,120,720,5040,40320,362880};

bool com(P2 x,P2 y){
	if(x.sc.fr!=y.sc.fr)return x.sc.fr;
	return x.sc.sc>=y.sc.sc;
}

int main(){
	int ppp=0;
	while(1){
		ppp++; if(ppp>=6)Sleep(100000);
		static int v,w;
		static int x[110],y[110];
		static int s,t;
		
		scanf("%d%d",&v,&w); if(v==0&&w==0)break;
		rep1(i,v)scanf("%d%d",&x[i],&y[i]);
		
		static vector<P1> V_; V_.clear();
		rep1(i,v){
			V_.pb(mp1(x[i],y[i],i));
		}
		sor(V_);
		static vector<P2> vec_[110];
		rep1(i,v){
			vec_[i].clear();
			vec_[i].pb(mp2(0,false,-INF));
			rep1(j,v){
				if(i==j)continue;
				if(x[i]<x[j]){
					vec_[i].pb(mp2(j,true,(double)(y[j]-y[i])/(x[j]-x[i])));
				}
				else if(x[i]>x[j]){
					vec_[i].pb(mp2(j,false,(double)(y[j]-y[i])/(x[j]-x[i])));
				}
				else {
					if(y[j]>y[i])vec_[i].pb(mp2(j,true,(double)INF));
					else vec_[i].pb(mp2(j,true,(double)-INF));
				}
			}
			sort(vec_[i].begin(),vec_[i].end(),com);
		}
		
		static int e;
		static vector<int> V; V.clear();
		static bool edge[110][110];
		static vector<int> vec[110]; 
		
		e=w;
		rep(i,v)V.pb(V_[i].sc.sc);
		rep(i,110)rep(j,110)edge[i][j]=false;
		rep(i,e){
			scanf("%d%d",&s,&t);
			edge[s][t]=true;
			edge[t][s]=true;
		}
		rep1(i,v){
			vec[i].clear();
			rep(j,vec_[i].size()){
				vec[i].pb(vec_[i][j].fr);
			}
		}
		
		int ret=0;
		while(e>0){
			ret++;
			
			int a=-1;
			rep(i,V.size()){
				rep(j,105){
					if(edge[V[i]][j]){a=V[i]; break;}
				}
				if(a!=-1)break;
			}
			
			int b=0,c=a;
			while(1){
				if(c==-1||vec[c].size()==0)break;
				rep(i,vec[c].size()){
					if(vec[c][i]==b){
						i++; i%=vec[c].size();
						while(!edge[c][vec[c][i]]){
							i++; i%=vec[c].size();
						}
						edge[c][vec[c][i]]=false;
						edge[vec[c][i]][c]=false;
						e--;
						b=c;
						c=vec[c][i];
						break;
					}
				}
				if(c==a)break;
			}
			
			bool updata=true;
			while(updata){
				updata=false;
				rep1(i,v){
					int cnt=0;
					int t=105;
					rep1(j,v){
						if(edge[i][j]){cnt++; t=j;}
					}
					if(cnt==1){
						updata=true;
						edge[i][t]=false;
						edge[t][i]=false;
						e--;
					}
				}
			}
		}
		
		printf("%d\n",ret);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:34: error: 'Sleep' was not declared in this scope
   52 |                 ppp++; if(ppp>=6)Sleep(100000);
      |                                  ^~~~~