Language: C

#include<cstdlib>
#include<iostream>
#include<cstdio>
#include<queue>
#include<cmath>
#include<map>
using namespace std;
const int N = 10015;
typedef double db;
const db eps = 1e-8;
int sign(db x){return (x>eps)-(x<-eps);}
struct P{
    db x,y;
    P(db a = 0.,db b = 0.):x(a),y(b){}
    P operator+(const P& a)const{return P(x+a.x,y+a.y);}
    P operator-(const P& a)const{return P(x-a.x,y-a.y);}
    db operator^(const P& a)const{return x*a.y-y*a.x;}
    P operator*(const db& k)const{return P(x*k,y*k);}
    db operator*(const P& a)const{return x*a.x+y*a.y;}
    db cross(P a,P b){
        return (a-*this)^(b-*this);
    }
    db L(){return sqrt(x*x+y*y);}
    P T(){return P(y,-x);}
    db disLine(P l1,P l2){
        return cross(l1,l2)/(l1-l2).L();
    }
    bool operator<(const P& a)const{
        if(sign(y-a.y)) return y < a.y;
        return x < a.x;
    }
    bool operator==(const P& a)const{
        return !sign(x-a.x)&&!sign(y-a.y);
    }
    void out(){printf("(%.0lf,%.0lf)\n",x,y);}
}pt[N],con[N],O,newCon[N];
struct Line{
    P a,b;
}le[N];
P ins(P l1,P l2,P l3,P l4){
    db k = ((l1-l3)^(l3-l4))/((l1-l2)^(l3-l4));
    return l1 + ((l2-l1)*k);
}
db S,R,dis[N],ver[N];
int tubao(int n){
    if(n < 3) return 0;
    sort(pt,pt+n);
    //n = unique(pt,pt+n) - pt;
    con[0] = pt[0];
    con[1] = pt[1];
    int top = 1;
    for(int i = 2; i < n; i ++){
        while(top>0&&con[top-1].cross(con[top],pt[i]) < eps) top --;
        con[++top] = pt[i];
    }
    int tp = top;
    con[++top] = pt[n-2];
    for(int i = n - 3; i >= 0; i --){
        while(top>tp&&con[top-1].cross(con[top],pt[i]) < eps) top --;
        con[++top] = pt[i];
    }
    return top;
}
db area(P ch[],int n){
    db s = 0.;
    for(int i = 0; i < n; i ++){
        s += (ch[i]^ch[i+1]);
    }
    return s*0.5;
}
db rot(P ch[],P ch2[],int n){
    db ans = 0.;
    int ret;
    for(int p = 0,q = 1;p < n; p ++){
        while(ch[p].cross(ch[p+1],ch2[q+1]) - ch[p].cross(ch[p+1],ch2[q]) > eps) q = (q+1)%n;
        ans = max(ans,max((ch[p]-ch2[q]).L(),(ch[p+1]-ch2[q+1]).L()));
    }
    return ans;
}
map<P,bool> mp;
int main()
{
    freopen("1004.in","w",stdout);
    srand(time(0));
    int T = 100;
    int x ,y;
    while(T--)
    {
        int n = 4;
        printf("%d\n",n);
        mp.clear();
        for(int i = 0; i < 2; i ++){
            x = rand()%10,y = rand()%10;
            if(mp[P(x,y)]) i --;
            else mp[P(x,y)] = 1;
            pt[i] = P(x,y);
        }
        do{
            x = rand()%10,y = rand()%10;
            pt[2] = P(x,y);
        }while(!sign(pt[0].cross(pt[1],pt[2])));
        mp[pt[2]] = 1;
        for(int i = 3; i < n; i ++){
            x = rand()%10,y = rand()%10;
            if(mp[P(x,y)]) i --;
            else mp[P(x,y)] = 1;
            pt[i] = P(x,y);
        }
        for(int i = 0; i < n; i ++) pt[i].out();
        int tp = tubao(n);
        db s = area(con,tp),r = rot(con,con,tp);
        db S = (int)s + rand()%6 - 2;
        db R = (int)r + rand()%10 - 3;
        printf("%lf %lf\n\n",S,R);
    }
}
/*
4
(5,3)
(4,4)
(2,8)
(7,9)
13.000000 11.000000
*/

Compiler output:
main.c:1:9: fatal error: cstdlib: No such file or directory
    1 | #include<cstdlib>
      |         ^~~~~~~~~
compilation terminated.